MCPcopy Create free account
hub / github.com/boostorg/beast / do_patch

Function do_patch

example/http/client/methods/http_client_methods.cpp:73–84  ·  view source on GitHub ↗

perform a patch request

Source from the content-addressed store, hash-verified

71
72// perform a patch request
73void do_patch(beast::tcp_stream & stream,
74 http::request<http::string_body> & req,
75 beast::flat_buffer buffer,
76 http::response<http::dynamic_body> & res)
77{
78 req.target("/patch");
79 req.method(beast::http::verb::patch);
80 req.body() = "Some random patch data";
81 req.prepare_payload(); // set content-length based on the body
82 http::write(stream, req);
83 http::read(stream, buffer, res);
84}
85
86
87// perform a put request

Callers 1

mainFunction · 0.85

Calls 5

targetMethod · 0.80
methodMethod · 0.80
bodyMethod · 0.80
writeFunction · 0.50
readFunction · 0.50

Tested by

no test coverage detected