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

Method send_request

lib_acl_cpp/src/http/http_service.cpp:302–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300 }
301
302 http_status_t send_request(void)
303 {
304 string hdr_req;
305 if (!data_.callback->build_request(hdr_req)) {
306 return HTTP_ERR_REQ;
307 }
308
309 // д HTTP ����ͷ
310 if (!client_.write(hdr_req.c_str(), hdr_req.length())) {
311 return HTTP_ERR_SEND;
312 }
313
314 // ѭ������������л�����������ݣ���д HTTP ����������
315 while (true) {
316 const string* data = data_.callback->get_body();
317 if (data == NULL || data->empty()) {
318 break;
319 }
320 if (!client_.write(data->c_str(), data->length())) {
321 return HTTP_ERR_SEND;
322 }
323 }
324 return HTTP_OK;
325 }
326
327 http_status_t read_respond_hdr(void)
328 {

Callers

nothing calls this directly

Calls 6

build_requestMethod · 0.45
writeMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45
get_bodyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected