High level HTTP Request Library that gives a javascript fetch like API.

Overview

Fetch for Arduino

fetch is a high level HTTP Request Library that gives you a javascript fetch like API.

ResponseOptions options;
options.method = "POST";
options.fingerprint = "DC 78 3C 09 3A 78 E3 A0 BA A9 C5 4F 7A A0 87 6F 89 01 71 4C";
options.headers.contentType = "application/json";
options.body = "{\"email\": \"[email protected]\", \"password\": \"test:80\"}";

/** In JSON, this would look like:
 * options = {
 *      method: "POST",
 *      fingerprint: "DC 78 3C 09 3A 78 E3 A0 BA A9 C5 4F 7A A0 87 6F 89 01 71 4C",
 *      headers: { contentType: "application/json" },
 *      body: "{\"email\": \"[email protected]\", \"password\": \"test:80\"}",
 * }
 */

Response response = fetch("https://api.grandeur.tech/auth/login/?apiKey=grandeurkywxmoy914080rxf9dh05n7e", options);

Include

#include <Fetch.h>

Usage

Response response = fetch(const char* url, RequestOptions options);

Request Options

RequestOptions options;

/**
    {
        method: "GET" || "POST" || "HEAD" || "PUT" || "DELETE",
        headers: { "Content-Type": "application/x-www-form-urlencoded", "Content-Length": Automatic, "Host: FromURL, "User-Agent": "arduino-fetch", "Cookie": "", "Accept": "* /*", "Connection": "close", "Transfer-Encoding": "chunked" },
        body: "",
        redirect: "follow" || "manual", "error",
        follow: Integer,

    }
*/

ResponseOptions options;
options.method = "POST";
options.body = "email=EMAIL&password=PASSWORD";

Request Body

String body;
// application/x-www-form-urlencoded
body = "email=EMAIL&password=PASSWORD";
// application/json
body = "{\"email\":\"EMAIL\", \"password\"=\"PASSWORD\"}";

Request Headers

Headers headers;

headers.contentType = "application/json";
headers.connection = "keep-alive";
headers.cookie = "abc=def,ghi=jkl"; // Not yet supported.

Response

Response response;

String data = response.text();
JSONBody data = response.json(); // Not yet supported.
const Blob = response.blob(); // Not yet supported.
const FormData = response.formData(); // Not yet supported.
unsigned int[] array = response.arrayBuffer(); // Not yet supported.

bool ok = response.ok;
int status = response.status;
const char* statusText = response.statusText;
bool redirected = response.redirected; // Not yet supported.
const char* type = response.type; // Not yet supported.
const char* response.headers.get("content-type");
Headers headers = response.headers.raw(); // Not yet supported
const char* contentTypeHeader = headers["content-type"]; // Not yet supported.
Comments
  • Dependency Issues for ESP32 Board

    Dependency Issues for ESP32 Board

    First of all, thank you for writing this Fetch abstraction layer. I am trying to get it working on my ESP32 board and am running into compatibility issues with some of the dependencies.

    The first issue I ran into was a missing dependency "LCBUrl". I installed it manually and it is now compiling past that point, but giving me a warning. "WARNING: library LCBUrl claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s)."

    The second issue, which I am currently stuck on is related to the WifiClientSecure class. The ESP32 board appears to install a WifiClientSecure package, but it does not have the same methods that you are calling.

    C:\Users\KoGMa\Documents\Arduino\libraries\Fetch\src\Fetch.cpp: In function 'Response fetch(const char*, RequestOptions)':
    C:\Users\KoGMa\Documents\Arduino\libraries\Fetch\src\Fetch.cpp:17:21: error: 'class WiFiClientSecure' has no member named 'setFingerprint'
             else client.setFingerprint(options.fingerprint.c_str());
                         ^
    C:\Users\KoGMa\Documents\Arduino\libraries\Fetch\src\Fetch.cpp:21:57: error: no matching function for call to 'WiFiClientSecure::connect(String&, uint&)'
         while(!client.connect(parsedUrl.host, parsedUrl.port)) {
                                                             ^
    In file included from C:\Users\KoGMa\Documents\Arduino\libraries\Fetch\src\Fetch.cpp:2:0:
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:48:9: note: candidate: virtual int WiFiClientSecure::connect(IPAddress, uint16_t)
         int connect(IPAddress ip, uint16_t port);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:48:9: note:   no known conversion for argument 1 from 'String' to 'IPAddress'
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:49:9: note: candidate: virtual int WiFiClientSecure::connect(IPAddress, uint16_t, int32_t)
         int connect(IPAddress ip, uint16_t port, int32_t timeout);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:49:9: note:   candidate expects 3 arguments, 2 provided
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:50:9: note: candidate: virtual int WiFiClientSecure::connect(const char*, uint16_t)
         int connect(const char *host, uint16_t port);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:50:9: note:   no known conversion for argument 1 from 'String' to 'const char*'
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:51:9: note: candidate: virtual int WiFiClientSecure::connect(const char*, uint16_t, int32_t)
         int connect(const char *host, uint16_t port, int32_t timeout);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:51:9: note:   candidate expects 3 arguments, 2 provided
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:52:9: note: candidate: int WiFiClientSecure::connect(IPAddress, uint16_t, const char*, const char*, const char*)
         int connect(IPAddress ip, uint16_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:52:9: note:   candidate expects 5 arguments, 2 provided
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:53:9: note: candidate: int WiFiClientSecure::connect(const char*, uint16_t, const char*, const char*, const char*)
         int connect(const char *host, uint16_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:53:9: note:   candidate expects 5 arguments, 2 provided
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:54:9: note: candidate: int WiFiClientSecure::connect(IPAddress, uint16_t, const char*, const char*)
         int connect(IPAddress ip, uint16_t port, const char *pskIdent, const char *psKey);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:54:9: note:   candidate expects 4 arguments, 2 provided
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:55:9: note: candidate: int WiFiClientSecure::connect(const char*, uint16_t, const char*, const char*)
         int connect(const char *host, uint16_t port, const char *pskIdent, const char *psKey);
             ^
    C:\Users\KoGMa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFiClientSecure\src/WiFiClientSecure.h:55:9: note:   candidate expects 4 arguments, 2 provided
    
    

    What would you recommend to do to get this working with an ESP32 board?

    bug 
    opened by HatterIsMad 5
  • Question, HTTPS issue

    Question, HTTPS issue

    Hi, I cannot seem to get my code working with HTTPS. It will just print out dots instead of any response. Any help would be appreciated.

    RequestOptions options;
      
        Headers headers;
    
        headers.contentType = "application/json";
        headers.connection = "keep-alive";
        headers.authkey = "foxtrot%LovesAPIs2022!";
        
        options.method = "GET";
        options.fingerprint = "C6 D5 5E A8 A5 B0 47 41 E5 A6 62 58 B5 B1 4B 64 E8 39 30 DF";
        
        Response response = fetch("https://foxtrot-mixpanel-api.herokuapp.com/", options);
        
        // Printing response body as plain text.
        Serial.println();
        Serial.println(response.statusText);
        Serial.println(response.text());
    
    invalid 
    opened by ryanballa 3
  • LCBUrl need to be updated

    LCBUrl need to be updated

    Please consider to update LCBUrl lib or unlink from your code in a way that can be installed and maintained separately.

    Current version is not working with the new restrictions on Espressif ESP32 boards

    Thanks

    opened by mauromorello 1
  • fatal error: Seeed_Arduino_FreeRTOS.h: No such file or directory

    fatal error: Seeed_Arduino_FreeRTOS.h: No such file or directory

    I'm using an Arduino Nano 33 IOT in combination with Arduino cloud.

    After just putting in #include <Fetch.h>

    I get the following error:

    /usr/local/bin/arduino-cli compile --fqbn arduino:samd:nano_33_iot --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/260877906/build --build-path /tmp/arduino-build-AE368CC7328FCB720E1058DE3A5AF9B4 --library /mnt/create-efs/webide/f6/8c/f68c6eea0c7e0ac8d2a2abd1ea91c36f:ryanfarber/libraries_v2/Fetch --library /home/builder/opt/libraries/tasker_2_0_3 /tmp/260877906/plantbot_sep27a
    
    Using library seeed_arduino_rpcunified_2_1_4 at version 2.1.4 in folder: /home/builder/opt/libraries/seeed_arduino_rpcunified_2_1_4
    
    Using library freertos_samd51_1_2_0 at version 1.2.0 in folder: /home/builder/opt/libraries/freertos_samd51_1_2_0
    
    In file included from /home/builder/opt/libraries/latest/seeed_arduino_rpcunified_2_1_4/src/esp/esp_event_loop.h:22:0,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcunified_2_1_4/src/esp/esp_lib_unified.h:12,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcunified_2_1_4/src/seeed_rpcUnified.h:11,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcwifi_1_0_6/src/WiFiGeneric.h:26,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcwifi_1_0_6/src/WiFiSTA.h:28,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcwifi_1_0_6/src/WiFi.h:32,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcwifi_1_0_6/src/rpcWiFi.h:1,
    
    from /home/builder/opt/libraries/latest/seeed_arduino_rpcwifi_1_0_6/src/WiFiClientSecure.h:25,
    
    from /mnt/create-efs/webide/f6/8c/f68c6eea0c7e0ac8d2a2abd1ea91c36f:ryanfarber/libraries_v2/Fetch/src/Fetch.cpp:3:
    
    /home/builder/opt/libraries/latest/seeed_arduino_rpcunified_2_1_4/src/esp/esp_event.h:18:10: fatal error: Seeed_Arduino_FreeRTOS.h: No such file or directory
    
    #include "Seeed_Arduino_FreeRTOS.h"
    
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
    
    compilation terminated.
    
    Error during build: exit status 1
    
    opened by ryanfarber 0
  • Incorrect type ResponseOptions used in README docs

    Incorrect type ResponseOptions used in README docs

    Hello,

    Thanks for making this great library! It seems to work well, although in the process of trying it out I did find a minor issue with the docs.

    The type for the options object was incorrectly documented as being ResponseOptions, when it's actually RequestOptions. I thought it may have been left over from a previous release, but looking through the commits this type doesn't seem to have ever existed).

    I was confused for a little while today after adding Fetch to my project by following the README, and getting a compilation error:

    src/main.cpp:56:3: error: 'ResponseOptions' was not declared in this scope
       ResponseOptions options;
       ^
    

    In retrospect it makes much more sense for it to be an instance of RequestOptions when I'm sending a request, not configuring the response – I'm not sure what this would even mean :-)

    opened by nicolasff 0
  • Unable to compile project on ESP32 board

    Unable to compile project on ESP32 board

    Hi there,

    I'm trying to implement this project on a M5Stack Core2 (ESP32) board, but am having issues compiling the code. Would love some input or debugging tips!

    Error:

    /Arduino/libraries/Fetch/src/utils/Url/LCBUrl/LCBUrl.cpp: In member function 'bool LCBUrl::isMDNS(const char*)':
    /Arduino/libraries/Fetch/src/utils/Url/LCBUrl/LCBUrl.cpp:579:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
      char * lastLabel = "\0";
                         ^~~~
    /Arduino/libraries/Fetch/src/utils/Url/LCBUrl/LCBUrl.cpp: In member function 'IPAddress LCBUrl::getIP(const char*)':
    /Arduino/libraries/Fetch/src/utils/Url/LCBUrl/LCBUrl.cpp:634:48: error: cannot convert 'ip4_addr*' to 'esp_ip4_addr_t*' {aka 'esp_ip4_addr*'}
             esp_err_t err = mdns_query_a(hn, 2000, &addr);
                                                    ^~~~~
    In file included from /Users/dblencowe/Library/Arduino15/packages/m5stack/hardware/esp32/2.0.3/libraries/ESPmDNS/src/ESPmDNS.h:46,
                     from /Arduino/libraries/Fetch/src/utils/Url/LCBUrl/LCBUrl.h:41,
                     from /Arduino/libraries/Fetch/src/utils/Url/LCBUrl/LCBUrl.cpp:32:
    /Users/dblencowe/Library/Arduino15/packages/m5stack/hardware/esp32/2.0.3/tools/sdk/esp32/include/mdns/include/mdns.h:649:83: note:   initializing argument 3 of 'esp_err_t mdns_query_a(const char*, uint32_t, esp_ip4_addr_t*)'
     esp_err_t mdns_query_a(const char * host_name, uint32_t timeout, esp_ip4_addr_t * addr);
                                                                      ~~~~~~~~~~~~~~~~~^~~~
    

    Project Code

    #define LCBURL_MDNS
    #include <M5Core2.h>
    #include <WiFi.h>
    #include <Fetch.h>
    
    const char* ssid = "";
    const char* password = "";
    const String apiAddress = "";
    const String apiToken = "";
    const String hostname = "ESP32";
    
    IPAddress localIp;
    #define CACert ""
    
    void setup() {
      M5.begin();
      Serial.begin(115200);
      WiFi.setHostname(hostname.c_str());
      setupWifi();
      Serial.println("Local IP: " + localIp.toString());
    
    
      RequestOptions options;
      options.method = "GET";
      options.caCert = CACert;
      
      Response response = fetch("https://api.github.com/", options);
      
      // Printing response body as plain text.
      Serial.println();
      Serial.println(response.text());
    }
    
    void loop() {
      
    }
    
    void setupWifi() {
       WiFi.mode(WIFI_STA);
       WiFi.begin(ssid, password);
       Serial.print("connecting to wifi..");
       while (WiFi.status() != WL_CONNECTED) {
        Serial.print('.');
        delay(1000);
      }
      Serial.println("");
      Serial.print("RRSI: ");
      Serial.println(WiFi.RSSI());
      localIp = WiFi.localIP();
    }
    

    Currently compiling on version 1.8.15 of the Arduino IDE, using an Intel Macbook

    Thanks!

    opened by dblencowe 5
  • Fatal error: missing WiFiClientSecure.h

    Fatal error: missing WiFiClientSecure.h

    Hello. I'm working with an Adafruit Matrix Portal, and can't get your (wonderful looking!) library to initialize. I'm getting the following output:

    Multiple libraries were found for "Adafruit_ZeroDMA.h"
     Used: /Users/dan/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Adafruit_ZeroDMA
     Not used: /Users/dan/Documents/Arduino/libraries/Adafruit_Zero_DMA_Library
    /Users/dan/Documents/Arduino/libraries/Fetch/src/Fetch.cpp:3:10: fatal error: WiFiClientSecure.h: No such file or directory
        3 | #include <WiFiClientSecure.h>
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    exit status 1
    

    This particular board uses WiFiNINA.h to get connected. Not sure if that's relevant! Just trying to offer whatever information I can! Would love any help with this. Thanks!

    opened by dzaharia1 4
Releases(0.1.2)
  • 0.1.2(Jul 18, 2022)

    You can now pass a callback function to fetch and fetch will pass the response to that callback function when it's received instead of blocking the rest of the code until it receives the response. Here's how you can do it:

    
    // Fetch, in async mode, returns a FetchClient instead of returning the response.
    FetchClient client;
    
    void handleResponse(Response response) {
        Serial.println(response);
    }
    
    void setup() {
        // Setting options.
        RequestOptions options;
        options.method = "GET";
    
        // Making the request.
        client = fetch("http://api.grandeur.tech", options, handleResponse);
    
        Serial.println("This now prints before the response is printed.");
    }
    
    void loop() {
        // This is crucial, it listens on the connection for the response, until it's received.
        client.loop()
    }
    
    

    If you want to do more than one fetch, you need to create more than one FetchClient variables and more than one client.loop()s.

    Only if you are doing fetch sequentially, that is, the next fetch happens after the previous fetch response has returned, then you can reuse the same FetchClient.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Feb 20, 2022)

    Library syntax has updated and dot notation (headers.contentType) for setting headers in RequestOptions is dropped in favor of square-brackets notation headers["Content-Type"] because the latter supports custom headers:

    This will break:

    RequestOptions options;
    options.headers.contentType = "application/json";
    

    This now works:

    RequestOptions options;
    options.headers["Content-Type"] = "application/json";
    

    Syntax for accessing response headers is also updated:

    Old syntax:

    response.headers.get("Content-Type");
    

    New syntax:

    response.headers["Content-Type"];
    

    Thank you all for your feedback. Keep supporting! ❤️

    Full Changelog: https://github.com/instanceofMA/arduino-fetch/compare/0.0.3...0.1.0

    Source code(tar.gz)
    Source code(zip)
  • 0.0.3(Feb 2, 2022)

    Provides support for ESP32 with CACert option:

    #define CACert "-----BEGIN CERTIFICATE-----\n\
    MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs\n\
    MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n\
    d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j\n\
    ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL\n\
    MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3\n\
    LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug\n\
    RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm\n\
    +9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW\n\
    PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM\n\
    xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB\n\
    Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3\n\
    hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg\n\
    EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF\n\
    MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA\n\
    FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec\n\
    nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z\n\
    eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF\n\
    hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2\n\
    Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe\n\
    vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep\n\
    +OkuE6N36B9K\n\
    -----END CERTIFICATE-----"
    
    options.caCert = CACert;
    
    Response response = fetch("https://api.github.com", options);
    

    Already works with ESP8266 with fingerprint option:

    #define FINGERPRINT "96 84 07 DF 0B 1C F6 58 14 DF D7 33 35 57 51 9B 15 4D 8C E7"
    
    options.fingerprint = FINGERPRINT;
        
    Response response = fetch("https://api.github.com/", options);
    
    Source code(tar.gz)
    Source code(zip)
  • 0.0.2(Jan 29, 2022)

    This release implements the basic functionalities that can be found in the Javascript fetch API.

    You can make GET and POST request to any HTTP and HTTPS server. In case of HTTPS server, you need to provide the server's SHA1 fingerprint which you can find by opening the webpage in browser, clicking on the greenlock, and going into the certificate details.

    In Javascript, fetch API works like:

    const response = await fetch("https://api.grandeur.tech/", {
      method: "GET"
    });
    
    console.log(response);
    

    In Arduino, you can do this:

    RequestOptions options;
    options.method = "GET";
    
    Response response = fetch("https://api.grandeur.tech/", options);
    Serial.println(response);
    

    You can also provide your headers to the request like this:

    options.headers.contentType = "application/json";
    

    You can also provide your body to the request like this:

    options.body = "{\"email\": \"EMAIL\"}";
    

    The response object gives you the following data:

    response.status = 200;
    response.statusText = "OK";
    

    You can also get response headers like this:

    response.headers.get("Content-Type");
    
    Source code(tar.gz)
    Source code(zip)
Owner
ma.name
All in with IoT. Co-founder Grandeur Technologies ☁. Making building IoT products seamless. https://grandeur.tech.
ma.name
Arduino HTTP Client library

ArduinoHttpClient ArduinoHttpClient is a library to make it easier to interact with web servers from Arduino. Derived from Adrian McEwen's HttpClient

Arduino Libraries 222 Jan 6, 2023
Server side minimalistic HTTP protocol implementation for the Arduino platform.

ArduinoHttpServer Server side minimalistic Object Oriented HTTP protocol implementation for the Arduino platform. ArduinoHttpServer is a simple HTTP r

Sander 18 Oct 17, 2022
A simple C++ API client for the Ark Blockchain.

Ark C++ - Client A simple C++ API client for the Ark Blockchain. Lead Maintainer: Simon Downey Documentation You can find installation instructions an

ARK Ecosystem 11 Jan 21, 2022
The Approximate Library is a WiFi Arduino library for building proximate interactions between your Internet of Things and the ESP8266 or ESP32

The Approximate Library The Approximate library is a WiFi Arduino Library for building proximate interactions between your Internet of Things and the

David Chatting 102 Dec 7, 2022
Arduino Arduino library for the CloudStorage server project. The library provides easy access to server-stored values and operations.

Arduino-CloudStorage Arduino/ESP8266 library that allows you to easly store and retreive data from a remote (cloud) storage in a key/value fashion. Cl

Gil Maimon 7 Jan 30, 2022
Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames.

107-Arduino-MCP2515 Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames. This library is prepared to interface easily

107-Systems 51 Nov 16, 2022
Arduino library for interfacing with any GPS, GLONASS, Galileo or GNSS module and interpreting its NMEA messages.

107-Arduino-NMEA-Parser Arduino library for interfacing with any GPS, GLONASS, Galileo or GNSS module and interpreting its NMEA messages. This library

107-Systems 15 Jan 1, 2023
Arduino library for providing a convenient C++ interface for accessing UAVCAN.

107-Arduino-UAVCAN Arduino library for providing a convenient C++ interface for accessing UAVCAN (v1.0-beta) utilizing libcanard. This library works f

107-Systems 54 Jan 2, 2023
Arduino web server library.

aWOT Arduino web server library. Documentation 1. Getting started Hello World Basic routing Application generator Serving static files 2. Guide Routin

Lasse Lukkari 246 Jan 4, 2023
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485

ABB Aurora protocol You can refer the complete documentation on my site ABB Aurora PV inverter library for Arduino, esp8266 and esp32 I create this li

Renzo Mischianti 22 Nov 22, 2022
Arduino library for the MCP2515 CAN Controller

MCP2515 CAN Controller Library for Arduino Compatibility with the ACAN library This library is fully compatible with the Teensy 3.x ACAN library https

Pierre Molinaro 4 Dec 18, 2022
An ESP32 CAN 2.0B library

CAN Library for ESP32 ACAN_ESP32 library description ACAN_ESP32 is a driver for the CAN module built into the ESP32 microcontroller. The driver suppor

Pierre Molinaro 11 Dec 9, 2022
CAN / CANFD Arduino Library for Teensy 4.0

CAN Library for Teensy 4.0 / 4.1 It handles Controller Area Network (CAN) for CAN1, CAN2 and CAN3, and Controller Area Network with Flexible Data (CAN

Pierre Molinaro 12 Dec 9, 2022
Analog Devices Analog Digital Converter AD7173 Arduino library

AD7173-Arduino Analog Devices AD7173 analog digital converter Arduino library Mostly tested setup for this library: 1007 data rate external crystal co

brain-duino 8 Nov 20, 2022
Arduino library for nRF51822-based Adafruit Bluefruit LE modules

This library is for all nRF51 based Adafruit Bluefruit LE modules that use SPI or UART. Current nRF51 based Bluefruit LE products include: Bluefruit L

Adafruit Industries 184 Nov 6, 2022
Library code for Adafruit's CC3000 WiFi breakouts &c

Adafruit CC3000 Library This is a library for the Adafruit CC3000 WiFi Breakouts etc Designed specifically to work with the Adafruit CC3000 Breakout -

Adafruit Industries 267 Sep 9, 2022
Arduino library for the Adafruit FONA

Adafruit FONA Library This library requires Arduino v1.0.6 or higher This is a library for the Adafruit FONA Cellular GSM Breakouts etc Designed speci

Adafruit Industries 199 Dec 15, 2022
Arduino library to access Adafruit IO from WiFi, cellular, and ethernet modules.

Adafruit IO Arduino Library This library provides a simple device independent interface for interacting with Adafruit IO using Arduino. It allows you

Adafruit Industries 168 Dec 23, 2022
Arduino library for MQTT support

Adafruit MQTT Library Arduino library for MQTT support, including access to Adafruit IO. Works with the Adafruit FONA, Arduino Yun, ESP8266 Arduino pl

Adafruit Industries 519 Jan 6, 2023