forked from lthn/blockchain
allow interruptible_http_client to accept 2xx responses
This commit is contained in:
parent
3c38e8562d
commit
70337d779d
1 changed files with 1 additions and 1 deletions
|
|
@ -932,7 +932,7 @@ using namespace std;
|
|||
m_pcb.reset(new idle_handler<callback_t>(cb));
|
||||
const http_response_info* p_hri = nullptr;
|
||||
bool r = invoke_request(url, *this, timeout, &p_hri, method, body, additional_params);
|
||||
if (p_hri && p_hri->m_response_code != 200)
|
||||
if (p_hri && !(p_hri->m_response_code >= 200 && p_hri->m_response_code < 300))
|
||||
{
|
||||
LOG_PRINT_L0("HTTP request to " << url << " failed with code: " << p_hri->m_response_code);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue