[HTTP] Added Doxygen comments
This commit is contained in:
parent
11004fa685
commit
d65033666f
1 changed files with 49 additions and 5 deletions
|
@ -4,14 +4,58 @@
|
||||||
#include "TypeDef.h"
|
#include "TypeDef.h"
|
||||||
#include "TransportLayer.h"
|
#include "TransportLayer.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class HTTPClient
|
||||||
|
|
||||||
|
\brief Client for simple HTTP communication.
|
||||||
|
*/
|
||||||
class HTTPClient {
|
class HTTPClient {
|
||||||
public:
|
public:
|
||||||
// constructor
|
/*!
|
||||||
|
\brief Default constructor.
|
||||||
|
|
||||||
|
\param tl Pointer to the wireless module providing TransportLayer communication.
|
||||||
|
|
||||||
|
\param port Port to be used for HTTP. Defaults to 80.
|
||||||
|
*/
|
||||||
HTTPClient(TransportLayer* tl, uint16_t port = 80);
|
HTTPClient(TransportLayer* tl, uint16_t port = 80);
|
||||||
|
|
||||||
// basic methods
|
/*!
|
||||||
|
\brief Sends HTTP GET request.
|
||||||
|
|
||||||
|
\param url URL to send the request to.
|
||||||
|
|
||||||
|
\param response Arduino String object that will save the response.
|
||||||
|
|
||||||
|
\returns \ref status_codes
|
||||||
|
*/
|
||||||
int16_t get(String& url, String& response);
|
int16_t get(String& url, String& response);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Sends HTTP GET request.
|
||||||
|
|
||||||
|
\param url URL to send the request to.
|
||||||
|
|
||||||
|
\param response Arduino String object that will save the response.
|
||||||
|
|
||||||
|
\returns \ref status_codes
|
||||||
|
*/
|
||||||
int16_t get(const char* url, String& response);
|
int16_t get(const char* url, String& response);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Sends HTTP POST request.
|
||||||
|
|
||||||
|
\param url URL to send the request to.
|
||||||
|
|
||||||
|
\param content Request content.
|
||||||
|
|
||||||
|
\param response Arduino String object that will save the response.
|
||||||
|
|
||||||
|
\param contentType MIME type of request content. Defaults to "text/plain".
|
||||||
|
|
||||||
|
\returns \ref status_codes
|
||||||
|
*/
|
||||||
int16_t post(const char* url, const char* content, String& response, const char* contentType = "text/plain");
|
int16_t post(const char* url, const char* content, String& response, const char* contentType = "text/plain");
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue