예제 #1
0
        public Task <HttpRequestMessage> GetRequestMessage(MoneroResponseSubType subType, dynamic requestParams, CancellationToken token)
        {
            AnonymousRequest   request            = GetRequest(subType, requestParams);
            IUriBuilder        uriBuilder         = new UriBuilderDirector(new UriBuilder(_url, _port, RequestEndpointExtensionRetriever.FetchEndpoint(request)));
            HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Build());

            return(SerializeRequest(httpRequestMessage, request, token));
        }
예제 #2
0
        public Task <HttpRequestMessage> GetRequestMessage(MoneroResponseSubType subType, CustomRequestParameters requestParams, CancellationToken token)
        {
            if (requestParams == null)
            {
                return(GetRequestMessage(subType, new GenericRequestParameters(), token));
            }
            var                request            = GetRequest(subType, requestParams);
            IUriBuilder        uriBuilder         = new UriBuilderDirector(new UriBuilder(_url, _port, RequestEndpointExtensionRetriever.FetchEndpoint(request)));
            HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Build());

            return(SerializeRequest(httpRequestMessage, request, token));
        }