Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions RestClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ int RestClient::post(const char* path, const char* body, String* response){
return request("POST", path, body, response);
}

// PATCH path and body
int RestClient::patch(const char* path, const char* body){
return request("PATCH", path, body, NULL);
}

// PATCH path and body with response
int RestClient::patch(const char* path, const char* body, String* response){
return request("PATCH", path, body, response);
}

// PUT path and body
int RestClient::put(const char* path, const char* body){
return request("PUT", path, body, NULL);
Expand Down
5 changes: 5 additions & 0 deletions RestClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ class RestClient {
// POST path and body and response
int post(const char* path, const char* body, String*);

// PATCH path and body
int patch(const char* path, const char* body);
// PATCH path and body and response
int patch(const char* path, const char* body, String*);

// PUT path and body
int put(const char* path, const char* body);
// PUT path and body and response
Expand Down