HTTPResult send_request_queue(){ HTTPResult result = http_out_send(); if(result == HTTP_OK){ request_in_progress = 1; } return result; }
void next_rows() { DictionaryIterator* req; http_out_get("http://wristmap.argyl.es/api/v1", rowN, &req); dict_write_int32(req, MAP_KEY_ULAT, ulat); dict_write_int32(req, MAP_KEY_ULON, ulon); dict_write_int32(req, MAP_KEY_ZOOM, zoom); dict_write_int32(req, MAP_KEY_ROW, rowN); http_out_send(); }
void request_values() { DictionaryIterator *body; #error Set URL below // http://nnnn/nnnn.values should return something like (not over 76 bytes) // {"0":"1210","1":"15464","2":"3600","3":"8212","4":"14506"} if (http_out_get("http://nnnn/nnnn.values", false, PBLINDEX_VALUES_COOKIE, &body) != HTTP_OK || http_out_send() != HTTP_OK) { set_display_fail("values.."); } }
void request_names() { DictionaryIterator *body; #error Set URL below // http://nnnn/nnnn.names should return something like (not over 76 bytes) // {"0":"OMXS30","1":"Dow Jones","2":"Nasdaq","3":"DAX","4":"Nikkei"} if (http_out_get("http://nnnn/nnnn.names", false, PBLINDEX_NAMES_COOKIE, &body) != HTTP_OK || http_out_send() != HTTP_OK) { set_display_fail("names.."); } }
// Starts an HTTP Request to get the time until the next pass of the ISS void start_http_request() { DictionaryIterator *out; HTTPResult result = http_out_get("http://io.sarfata.org/iss/", ISS_COOKIE, &out); if (result != HTTP_OK) { error = result; return; } result = http_out_send(); if (result != HTTP_OK) { error = result; return; } }
void start_http_request(int id) { DictionaryIterator *out; snprintf(durl, sizeof(durl), purl, id); HTTPResult result = http_out_get(durl, ISS_COOKIE, &out); if (result != HTTP_OK) { error = result; return; } result = http_out_send(); if (result != HTTP_OK) { error = result; return; } }
void get_current_program() { text_layer_set_text(&programlayer, "Loading"); DictionaryIterator* dict; HTTPResult result = http_out_get("http://japansio.info/api/program.php", HTTP_COOKIE, &dict); if (result != HTTP_OK) { httpebble_error(result); //Something went wrong with the request, fecth program again next minute REFRESH = true; return; } dict_write_cstring(dict, 1, "1"); result = http_out_send(); if (result != HTTP_OK) { //Something went wrong with the request, fecth program again next minute REFRESH = true; httpebble_error(result); return; } }
void select_single_click_handler(ClickRecognizerRef recognizer, Window *window) { DictionaryIterator* dict; http_out_get("http://pwdb.kathar.in/pebble/test.json", 17, &dict); http_out_send(); text_layer_set_text(&textLayer, "Sending."); }