MCPcopy Create free account
hub / github.com/ElementsProject/elements / http_errorstring

Function http_errorstring

src/mainchainrpc.cpp:26–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24};
25
26const char *http_errorstring(int code)
27{
28 switch(code) {
29#if LIBEVENT_VERSION_NUMBER >= 0x02010300
30 case EVREQ_HTTP_TIMEOUT:
31 return "timeout reached";
32 case EVREQ_HTTP_EOF:
33 return "EOF reached";
34 case EVREQ_HTTP_INVALID_HEADER:
35 return "error while reading header, or invalid header";
36 case EVREQ_HTTP_BUFFER_ERROR:
37 return "error encountered while reading or writing";
38 case EVREQ_HTTP_REQUEST_CANCEL:
39 return "request was canceled";
40 case EVREQ_HTTP_DATA_TOO_LONG:
41 return "response body is larger than allowed";
42#endif
43 default:
44 return "unknown";
45 }
46}
47
48static void http_request_done(struct evhttp_request *req, void *ctx)
49{

Callers 1

CallMainChainRPCFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected