MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / http_errorstring

Function http_errorstring

src/bitcoin-cli.cpp:119–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117};
118
119const char *http_errorstring(int code)
120{
121 switch(code) {
122#if LIBEVENT_VERSION_NUMBER >= 0x02010300
123 case EVREQ_HTTP_TIMEOUT:
124 return "timeout reached";
125 case EVREQ_HTTP_EOF:
126 return "EOF reached";
127 case EVREQ_HTTP_INVALID_HEADER:
128 return "error while reading header, or invalid header";
129 case EVREQ_HTTP_BUFFER_ERROR:
130 return "error encountered while reading or writing";
131 case EVREQ_HTTP_REQUEST_CANCEL:
132 return "request was canceled";
133 case EVREQ_HTTP_DATA_TOO_LONG:
134 return "response body is larger than allowed";
135#endif
136 default:
137 return "unknown";
138 }
139}
140
141static void http_request_done(struct evhttp_request *req, void *ctx)
142{

Callers 1

CallRPCFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected