@@ -29,6 +29,7 @@ static const int HTTP_ERROR_INVALID_RESPONSE =-4;
29
29
#define HTTP_METHOD_GET " GET"
30
30
#define HTTP_METHOD_POST " POST"
31
31
#define HTTP_METHOD_PUT " PUT"
32
+ #define HTTP_METHOD_PATCH " PATCH"
32
33
#define HTTP_METHOD_DELETE " DELETE"
33
34
#define HTTP_HEADER_CONTENT_LENGTH " Content-Length"
34
35
#define HTTP_HEADER_CONTENT_TYPE " Content-Type"
@@ -104,6 +105,24 @@ class HttpClient : public Client
104
105
int put (const String& aURLPath, const String& aContentType, const String& aBody);
105
106
int put (const char * aURLPath, const char * aContentType, int aContentLength, const byte aBody[]);
106
107
108
+ /* * Connect to the server and start to send a PATCH request.
109
+ @param aURLPath Url to request
110
+ @return 0 if successful, else error
111
+ */
112
+ int patch (const char * aURLPath);
113
+ int patch (const String& aURLPath);
114
+
115
+ /* * Connect to the server and send a PATCH request
116
+ with body and content type
117
+ @param aURLPath Url to request
118
+ @param aContentType Content type of request body
119
+ @param aBody Body of the request
120
+ @return 0 if successful, else error
121
+ */
122
+ int patch (const char * aURLPath, const char * aContentType, const char * aBody);
123
+ int patch (const String& aURLPath, const String& aContentType, const String& aBody);
124
+ int patch (const char * aURLPath, const char * aContentType, int aContentLength, const byte aBody[]);
125
+
107
126
/* * Connect to the server and start to send a DELETE request.
108
127
@param aURLPath Url to request
109
128
@return 0 if successful, else error
0 commit comments