9#ifndef _EL_CLIENT_REST_H_
10#define _EL_CLIENT_REST_H_
17#define DEFAULT_REST_TIMEOUT 5000
47 int begin(
const char* host, uint16_t port=80,
boolean security=
false);
50 void request(
const char* path,
const char* method,
const char* data=NULL);
53 void request(
const char* path,
const char* method,
const char* data,
int len);
56 void get(
const char* path,
const char* data=NULL);
59 void post(
const char* path,
const char* data);
62 void put(
const char* path,
const char* data);
65 void del(
const char* path);
86 int32_t remote_instance;
88 void restCallback(
void* resp);
#define DEFAULT_REST_TIMEOUT
Definitions for ELClient.
Core Utility - Templated Function Pointer Class.
void setUserAgent(const char *value)
Set user agent of header.
void put(const char *path, const char *data)
Send PUT request to REST server.
void del(const char *path)
Send DELETE request to REST server.
int begin(const char *host, uint16_t port=80, boolean security=false)
Initialize communication to a REST server.
void get(const char *path, const char *data=NULL)
Send GET request to REST server.
void request(const char *path, const char *method, const char *data=NULL)
Send request to REST server.
void setHeader(const char *value)
Set generic header content.
uint16_t waitResponse(char *data, uint16_t maxLen, uint32_t timeout=DEFAULT_REST_TIMEOUT)
Wait for the response.
void post(const char *path, const char *data)
Send POST request to REST server.
void setContentType(const char *value)
Set content type of header.
uint16_t getResponse(char *data, uint16_t maxLen)
Retrieve response.
API abstraction for a Function Pointers.