micro-elements - MicroElements.FluentProxy 0.1.0

Package Description

PM> Install-Package MicroElements.FluentProxy -Version 0.1.0 -Source https://www.myget.org/F/micro-elements/api/v3/index.json

Copy to clipboard

> nuget.exe install MicroElements.FluentProxy -Version 0.1.0 -Source https://www.myget.org/F/micro-elements/api/v3/index.json

Copy to clipboard

> dotnet add package MicroElements.FluentProxy --version 0.1.0 --source https://www.myget.org/F/micro-elements/api/v3/index.json

Copy to clipboard
<PackageReference Include="MicroElements.FluentProxy" Version="0.1.0" />
Copy to clipboard
source https://www.myget.org/F/micro-elements/api/v3/index.json

nuget MicroElements.FluentProxy  ~> 0.1.0
Copy to clipboard

> choco install MicroElements.FluentProxy --version 0.1.0 --source https://www.myget.org/F/micro-elements/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "micro-elements" -SourceLocation "https://www.myget.org/F/micro-elements/api/v2"
Install-Module -Name "MicroElements.FluentProxy" -RequiredVersion "0.1.0" -Repository "micro-elements" 
Copy to clipboard

MicroElements.FluentProxy

Simple http proxy to use in front of real services. Use it for tracing blackboxes and for mocking responses.

WARNING: version before 1.0.0 has unstable API. After stabilizing this warning will be removed!

Statuses

License NuGetVersion NuGetDownloads MyGetVersion

Travis AppVeyor Coverage Status

Gitter

Installation

Package Reference:

dotnet add package MicroElements.FluentProxy

Usage

var settings = new FluentProxySettings
{
    ExternalUrl = new Uri("https://api.github.com"),
    OnRequestFinished = session =>
    {
        Console.WriteLine(session.RequestUrl);
        Console.WriteLine(session.ResponseData.ResponseContent);
    }
};
FluentProxyServer fluentProxyServer = await FluentProxyFactory.CreateServer(settings);

var request = new HttpRequestMessage(HttpMethod.Get, "/repos/aspnet/docs/branches");
request.Headers.Add("Accept", "application/vnd.github.v3+json");
request.Headers.Add("User-Agent", "HttpClientFactory-Sample");

HttpClient httpClient = fluentProxyServer.GetHttpClient();

var httpResponseMessage = await httpClient.SendAsync(request);
var response = await httpResponseMessage.Content.ReadAsStringAsync();

Build

Windows: Run build.ps1

Linux: Run build.sh

License

This project is licensed under the MIT license. See the LICENSE file for more info.

0.1.0

  • Initial version

Full release notes can be found at: https://github.com/micro-elements/MicroElements.FluentProxy/blob/master/CHANGELOG.md

  • .NETStandard 2.0
    • JetBrains.Annotations (>= 2018.2.1)
    • Microsoft.AspNetCore (>= 2.1.0)
    • Microsoft.Extensions.Http (>= 2.1.0)
  • .NETStandard 2.0: 2.0.0.0

Owners

Alexey Petryashev

Authors

micro-elements

Project URL

https://github.com/micro-elements/MicroElements.FluentProxy

License

MIT

Info

106 total downloads
10 downloads for version 0.1.0
Download (12.22 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
0.7.1 18.02 KB Mon, 08 Oct 2018 14:12:29 GMT 11
0.7.0 18.04 KB Thu, 04 Oct 2018 15:56:07 GMT 9
0.6.1 17.58 KB Wed, 03 Oct 2018 15:19:54 GMT 9
0.6.0 17.46 KB Sun, 30 Sep 2018 21:47:11 GMT 11
0.5.0 15.87 KB Thu, 20 Sep 2018 06:40:27 GMT 8
0.4.1 15.95 KB Wed, 19 Sep 2018 10:00:27 GMT 10
0.4.0 15.95 KB Wed, 19 Sep 2018 09:54:04 GMT 8
0.3.0 14.36 KB Tue, 18 Sep 2018 15:52:49 GMT 10
0.2.1 13.91 KB Tue, 18 Sep 2018 12:24:08 GMT 10
0.2.0 13.84 KB Mon, 17 Sep 2018 21:58:47 GMT 10
0.1.0 12.22 KB Sun, 16 Sep 2018 21:21:29 GMT 10