public static T For <T>(HttpClient httpClient, IResponseDeserializer responseDeserializer = null, IRequestBodySerializer requestBodySerializer = null) { return(new RestClient(httpClient) { ResponseDeserializer = responseDeserializer, RequestBodySerializer = requestBodySerializer }.For <T>()); }
public Http( IHttpRequestSender requestSender, IResponseDeserializer responseDeserializer) { this.requestSender = requestSender; this.responseDeserializer = responseDeserializer; }
public static T For <T>(string baseUrl, RequestModifier requestModifier, IResponseDeserializer responseDeserializer = null, IRequestBodySerializer requestBodySerializer = null) { return(new RestClient(baseUrl, requestModifier) { ResponseDeserializer = responseDeserializer, RequestBodySerializer = requestBodySerializer }.For <T>()); }
public FunctionalTestCollection(TFactory factory) { _factory = factory; _client = _factory.CreateClient(); _dbContext = _factory.GetService <AppDbContext>(); _deserializer = GetDeserializer(); ClearDbContext(); }
public RESTClient(IHttpConnector HttpConnector, IResponseDeserializer Deserializer) { if (HttpConnector == null) { throw new ArgumentNullException(nameof(HttpConnector)); } if (Deserializer == null) { throw new ArgumentNullException(nameof(Deserializer)); } this.httpConnector = HttpConnector; this.deserializer = Deserializer; }
internal UkrlpSoapApiClient( HttpClient httpClient, UkrlpApiConfiguration configuration, ILogger <UkrlpSoapApiClient> logger, IRequestSerializer requestSerializer, IResponseDeserializer responseDeserializer) { _httpClient = httpClient; _httpClient.BaseAddress = new Uri(configuration.WebServiceUrl, UriKind.Absolute); _configuration = configuration; _logger = logger; _requestSerializer = requestSerializer; _responseDeserializer = responseDeserializer; }
public RestClient(Uri baseUri, TimeSpan timeout, Func <HttpMessageHandler> handlerFactory, IContentEncoder contentEncoder, IResponseDeserializer responseDeserializer) { ContentEncoder = contentEncoder; ResponseDeserializer = responseDeserializer; Timeout = timeout; BaseUri = baseUri; _client = new HttpClient(handlerFactory()) { Timeout = Timeout, BaseAddress = BaseUri }; _client.DefaultRequestHeaders.Accept.Clear(); }
public ResponseDeserializerWrapper(IResponseDeserializer deserializer) => this.deserializer = deserializer;
public EndToEndTest(TestFixture <TestStartup> fixture) { _fixture = fixture; _deserializer = GetDeserializer(); }
public HttpRestrictionSource(HttpClient client, HostPort host, IResponseDeserializer deserializer) { this.client = client ?? throw new ArgumentNullException(nameof(client)); this.host = host; this.deserializer = deserializer ?? throw new ArgumentNullException(nameof(deserializer)); }
/// <summary> /// Get response generic object from response, using own response deserializer. /// </summary> /// <typeparam name="T">Type of response object data.</typeparam> /// <returns>Response object</returns> public T GetResponse <T>(IResponseDeserializer <T> ownResponseDeserializer) => ownResponseDeserializer.Deserialize(GetResponseToString);
public HttpExecutor(IRequestSender requestSender, IResponseDeserializer responseDeserializer) { this.requestSender = requestSender; this.responseDeserializer = responseDeserializer; }
public HttpClientRequest SetDeserializer(IResponseDeserializer specificDeserializer) { this.Deserializer = specificDeserializer; return(this); }
public RestClient(IResponseDeserializer deserializer, RestSharp.IRestClient restClient) { _deserializer = deserializer; _restClient = restClient; }