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

Method send_request

lib_acl_cpp/src/http/http_request.cpp:374–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374bool http_request::send_request(const void* data, size_t len)
375{
376 // ���뱣֤�������Ѿ���
377 if (client_ == NULL) {
378 logger_error("connection not opened yet!");
379 return false;
380 }
381
382 client_->reset(); // ����״̬
383
384 // д HTTP ����ͷ
385 if (! client_->write_head(header_)) {
386 return false;
387 }
388
389 // д HTTP ������
390 if (! client_->write_body(data, len)) {
391 return false;
392 }
393
394 return true;
395}
396
397bool http_request::get()
398{

Callers 2

on_connectMethod · 0.45
on_connectMethod · 0.45

Calls 3

resetMethod · 0.45
write_headMethod · 0.45
write_bodyMethod · 0.45

Tested by

no test coverage detected