Function patch

Synopsis

#include <include/restclient-cpp/restclient.h>

Response patch(const std::string &url, const std::string &content_type, const std::string &data)

Description

HTTP PATCH method.

Parameters

url - to query

ctype - content type as string

data - HTTP PATCH body

Returns
response struct

Mentioned in

Source

Lines 125-134 in source/restclient.cc. Line 59 in include/restclient-cpp/restclient.h.

RestClient::Response RestClient::patch(const std::string& url,
                                     const std::string& ctype,
                                     const std::string& data) {
  RestClient::Response ret;
  RestClient::Connection *conn = new RestClient::Connection("");
  conn->AppendHeader("Content-Type", ctype);
  ret = conn->patch(url, data);
  delete conn;
  return ret;
}





Add Discussion as Guest

Log in