1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-10-13 23:48:28 +03:00

Added POST to HttpClient

Added POST to HttpClient and also the ability to set a header (for API
Keys) for GET and POST.
This commit is contained in:
Mark Jones
2014-06-03 10:30:28 -04:00
committed by Federico Fissore
parent 5de6192dae
commit c7e5e7cbfe
2 changed files with 66 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2013 Arduino LLC. All right reserved.
Copyright (c) 2013-2014 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -29,6 +29,12 @@ class HttpClient : public Process {
unsigned int get(const char * url);
void getAsynchronously(String &url);
void getAsynchronously(const char * url);
unsigned int post(String &url, String &data);
unsigned int post(const char * url, const char * data);
void postAsynchronously(String &url, String &data);
void postAsynchronously(const char * url, const char * data);
void setHeader(String &header);
void setHeader(const char * header);
boolean ready();
unsigned int getResult();
void noCheckSSL();
@@ -37,6 +43,9 @@ class HttpClient : public Process {
private:
boolean insecure;
private:
void addHeader();
String header;
};
#endif /* HTTPCLIENT_H_ */