perform a patch request
| 71 | |
| 72 | // perform a patch request |
| 73 | void 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 |