@@ -29,6 +29,7 @@ static const int HTTP_ERROR_INVALID_RESPONSE =-4;
2929#define HTTP_METHOD_GET " GET"
3030#define HTTP_METHOD_POST " POST"
3131#define HTTP_METHOD_PUT " PUT"
32+ #define HTTP_METHOD_PATCH " PATCH"
3233#define HTTP_METHOD_DELETE " DELETE"
3334#define HTTP_HEADER_CONTENT_LENGTH " Content-Length"
3435#define HTTP_HEADER_CONTENT_TYPE " Content-Type"
@@ -104,6 +105,24 @@ class HttpClient : public Client
104105 int put (const String& aURLPath, const String& aContentType, const String& aBody);
105106 int put (const char * aURLPath, const char * aContentType, int aContentLength, const byte aBody[]);
106107
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+
107126 /* * Connect to the server and start to send a DELETE request.
108127 @param aURLPath Url to request
109128 @return 0 if successful, else error
0 commit comments