Skip to content

Commit 1f0739c

Browse files
committed
Adding overloads to client facade.
1 parent b3c3471 commit 1f0739c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

boost/network/protocol/http/client/facade.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ namespace boost { namespace network { namespace http {
6363
return pimpl->request_skeleton(request, "POST", true, body_handler);
6464
}
6565

66+
response const post(request const &request, body_callback_function callback) {
67+
return post(request, string_type(), string_type(), callback);
68+
}
69+
70+
response const post(request const &request, string_type const &body, body_callback_function callback) {
71+
return post(request, body, string_type(), callback);
72+
}
73+
6674
response const put(request request, string_type const &body = string_type(), string_type const &content_type = string_type(), body_callback_function_type body_handler = body_callback_function_type()) {
6775
if (body != string_type()) {
6876
request << remove_header("Content-Length")
@@ -89,6 +97,14 @@ namespace boost { namespace network { namespace http {
8997
return pimpl->request_skeleton(request, "DELETE", true, body_handler);
9098
}
9199

100+
response const put(request const& request, body_callback_function_type callback) {
101+
return put(request, string_type(), string_type(), callback);
102+
}
103+
104+
response const put(request const& request, string_type body, body_callback_function_type callback) {
105+
return put(request, body, string_type(), callback);
106+
}
107+
92108
void clear_resolved_cache() {
93109
pimpl->clear_resolved_cache();
94110
}

0 commit comments

Comments
 (0)