MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetRequestMethod

Method GetRequestMethod

src/rpc/core/httpserver.cpp:622–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620std::string HTTPRequest::GetURI() const { return evhttp_request_get_uri(req); }
621
622HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() const {
623 switch (evhttp_request_get_command(req)) {
624 case EVHTTP_REQ_GET:
625 return GET;
626 break;
627 case EVHTTP_REQ_POST:
628 return POST;
629 break;
630 case EVHTTP_REQ_HEAD:
631 return HEAD;
632 break;
633 case EVHTTP_REQ_PUT:
634 return PUT;
635 break;
636 default:
637 return UNKNOWN;
638 break;
639 }
640}
641
642void RegisterHTTPHandler(const std::string& prefix, bool exactMatch,
643 const HTTPRequestHandler& handler) {

Callers 2

http_request_cbFunction · 0.80
JsonRPCHandlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected