MCPcopy Create free account
hub / github.com/acl-dev/acl / run

Method run

xcode/fiber_http/fiber_http/HttpTest.cpp:13–28  ·  view source on GitHub ↗

@override

Source from the content-addressed store, hash-verified

11
12 // @override
13 void run(void) {
14 acl::http_request request(addr_);
15 acl::http_header& hdr = request.request_header();
16 hdr.set_url(url_).set_host(addr_);
17 if (!request.request(NULL, 0)) {
18 delete this;
19 return;
20 }
21 acl::string body;
22 if (request.get_body(body)) {
23 printf("%s\r\n", body.c_str());
24 } else {
25 printf("get_body error=%s\r\n", acl::last_serror());
26 }
27 delete this;
28 }
29
30private:
31 acl::string addr_;

Callers

nothing calls this directly

Calls 5

request_headerMethod · 0.80
last_serrorFunction · 0.50
requestMethod · 0.45
get_bodyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected