Found 20 packages
A collection of helpful HttpRequestMessage extension methods
This package includes HttpClient for sending requests over HTTP, as well as HttpRequestMessage and HttpResponseMessage for processing HTTP messages. This package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5, Windows 8, or Windows Phone 8.1 when consuming a library that uses this package. Supported Platforms: - .NET Framework 4 - Windows 8 - Windows Phone 8.1 - Windows Phone Silverlight 7.5 - Silverlight 4 - Portable Class Libraries
Simple request builder functions on top of System.Net.Http!
Extension methods for easy unit tests with requests and responses.
Generic features related to HTTP and HTTPS. Contains extensions to HttpContent, and cloning an HttpRequestMessage via the HttpRequestMessageCloner.
*TestBase* gives you a flying start with - fluent assertions that are simple to extend - sharp error messages - tools to help you test with “heavyweight” dependencies on - AspNetCore.Mvc, AspNet.Mvc 3-5, or WebApi Contexts - HttpClient - Ado.Net - Streams & Logging - Mix & match with your favourite test runners & assertions. # TestBase.HttpClient.Fake ``` //Arrange var httpClient = new FakeHttpClient() .SetupGetUrl("https://host.*/").Returns(request=> "Got:" + request.RequestUri) .SetupGetPath("/uri[Pp]attern/").Returns("stringcontent") .SetupPost(".*").Returns(response) .SetupPost(".*", new byte[]{1,2,3}).Returns(otherResponse) .SetupPost(".*", "a=1&b=2") .Returns( request => "You said : " + request.Content.ReadAsStringAsync().ConfigureFalseGetResult(), HttpStatusCode.Accepted) .Setup(x=>x.RequestUri.PathAndQuery.StartsWith("/this")).Returns(response) .Setup(x=>x.Method ==HttpMethod.Put) .Returns(new HttpResponseMessage(HttpStatusCode.Accepted)); // Act var putResponse = await httpClient.PutAsync("http://localhost/thing", new StringContent("{a=1,b=2}")); var postResponse= await httpClient.PostAsync("http://[::1]/", new StringContent("a=1&b=2")); //Debug httpClient.Invocations .ForEach(async i =>Console.WriteLine("{0} {1}",i.RequestUri, await i.Content.ReadAsStringAsync())); //Assert putResponse.StatusCode.ShouldBe(HttpStatusCode.Accepted); postResponse.ShouldBe(response); // ==> SetupPost(".*").Returns(response) was the first // matched setup. Setups are tried in first-to-last order. httpClient.Verify(x=>x.Method ==HttpMethod.Put, "Expected Put, but no matching invocations."); httpClient.Verify( x=>x.Method ==HttpMethod.Post && x.Content.ReadAsStringAsync().ConfigureFalseGetResult()=="a=1&b=2", "Expected Post a=1&b=2"); httpClient.VerifyAll(); // ==> "Exception : 4 unmatched expectations" ``` ### TestBase Chainable fluent assertions get you to the point concisely. ``` UnitUnderTest.Action() .ShouldNotBeNull() .ShouldEqualByValueExceptFor(new {Id=1, Descr=expected}, ignoreList ) .Payload .ShouldMatchIgnoringCase("I expected this") .Should(someOtherPredicate); .ShouldEqualByValue().ShouldEqualByValueExceptFor(...).ShouldEqualByValueOnMembers() work with all kinds of object and collections, and report what differed. string.ShouldMatch(pattern).ShouldNotMatch().ShouldBeEmpty().ShouldNotBeEmpty() .ShouldNotBeNullOrEmptyOrWhiteSpace().ShouldEqualIgnoringCase() .ShouldContain().ShouldStartWith().ShouldEndWith().ShouldBeContainedIn().ShouldBeOneOf().ShouldNotBeOneOf() numeric.ShouldBeBetween().ShouldEqualWithTolerance()....GreaterThan....LessThan...GreaterOrEqualTo ... ienumerable.ShouldAll().ShouldContain().ShouldNotContain().ShouldBeEmpty().ShouldNotBeEmpty() ... stream.ShouldHaveSameStreamContentAs().ShouldContain() value.ShouldBe().ShouldNotBe().ShouldBeOfType().ShouldBeAssignableTo()... .ShouldAll(predicate), .SingleOrAssertFail()... ``` See also - [TestBase](https://www.nuget.org/packages/TestBase) - [TestBase.AspNetCore.Mvc](https://www.nuget.org/packages/TestBase.AspNetCore.Mvc) - [TestBase-Mvc](https://www.nuget.org/packages/TestBase-Mvc) - [TestBase.AdoNet](https://www.nuget.org/packages/TestBase.AdoNet) - [Serilog.Sinks.ListOfString](https://www.nuget.org/packages/Serilog.Sinks.Listofstring) - [Extensions.Logging.ListOfString](https://www.nuget.org/packages/Extensions.Logging.ListOfString)
.Net Core Integration Test Essentials: Extensions, Startup Runners, Assertions, Logging
Create an HttpRequestMessage from cURL Syntax
A .NET library for comprehensive and configurable logging of raw HTTP request and response messages.
Client-side HttpRequestMessage extensions for WebAssembly
Provides interfaces for types in System.Net.Http: HttpClient, HttpContent, HttpRequestMessage, HttpResponseMessage, HttpHeaders, DelegatingHandler, HttpClientHandler, HttpMessageHandler, HttpMessageInvoker, MessageProcessingHandler, MultipartContent, MultipartFormDataContent, HttpContentHeaders, HttpRequestHeaders, HttpResponseHeaders.
Convert HttpRequestMessage objects into cURL commands
An attribute that specifies that an action parameter comes only from the entity (JSON) body of the incoming System.Net.Http.HttpRequestMessage.
Extracts HttpMessageData from HttpClient's HttpRequestMessage and HttpResponseMessage
Basic interaction with Shopware6 REST API. Core includes Authentication, a ShopwareClient wrapping the necessary HttpConfiguration and Creation of a simple and valid HttpRequestMessage for interactions.
1. Tags: Utility, Sinx, SinxUtility, Sinx.Utility, Tool, bclExtension 2. Version 0.0.1.16: a. Get all files of a dir i. Method System.IO.File.DirectoryEx.GetFiles b. [net451] Convert office(word only this version) FileStream to html file i. Extension of System.IO.FileStream.SaveAsync ii. System.IO.FileStreamEx.SaveAsync 3. Version 0.0.1.26 a. Add System.Net.Http.HttpRequestMessageEx.CreateFromRaw method for create a request from raw from fiddler etc. b. Add System.Text.RegularExpressions.RegexEx.[set] for emil and url validate 4. Version 0.0.1.29 a. Add System.Net.Http.HttpRequestMessageEx.Clone method for clone a httpRequestMessage instance without connection processing limit b. [net451] System.Net.Mail.SmtpClient.Create method for create a client use Tecent QQ email or 163 email 5. Version 0.0.1.30 a. Add System.Reflection.TypeInfoEx.GetAssignedProperties method for get a complex class instance's initialized by user 6. Version 0.0.1.35 a. Add System.Data.IDbConnectionEx, witch makes your data operate easier.
This package includes HttpClient for sending requests over HTTP, as well as HttpRequestMessage and HttpResponseMessage for processing HTTP messages. This package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5, Windows 8, or Windows Phone 8.1 when consuming a library that uses this package. Supported Platforms: - .NET Framework 4 - Windows 8 - Windows Phone 8.1 - Windows Phone Silverlight 7.5 - Silverlight 4 - Portable Class Libraries Requires NuGet 2.8.1 or higher.
Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.
This Library is a fork to Ocelot to fix certified error in WebSocket. Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.