Add HTTP transport support with client and server integration #1971
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new HTTP transport implementation and associated tests for the Wolverine framework. It adds a public
HttpTransportclass, aWolverineHttpTransportClient, and comprehensive test coverage for both. Additionally, a sample external HTTP server is provided to demonstrate usage. The main themes are the implementation of HTTP transport, testing, and sample usage.HTTP Transport Implementation:
HttpTransportclass that manages HTTP endpoints, caches them, and supports initialization and endpoint retrieval by URI. The transport now uses HTTPS as its protocol and is derived fromTransportBase<HttpEndpoint>.WolverineHttpTransportClientclass that usesIHttpClientFactoryto send single envelopes or batches of messages over HTTP, properly serializing content and setting content types.Testing:
HttpTransportTeststo ensure correct protocol usage, endpoint caching, retrieval, and initialization logic for the HTTP transport.WolverineHttpTransportClientTeststo verify correct HTTP requests are made for both single envelopes and batches, including a mock HTTP handler for inspection.Sample Usage:
ExternalHttpServer.cs, a sample ASP.NET Core application showing how to configure Wolverine with HTTP transport, set up named HTTP clients, and define message handlers and endpoints.