Create HttpMessageHandler on .NET Core with possibility to make requests to myself

Viewed 67

I have a nightly job on .NET Core 2.1 app to make request to https://server/api/values This request should be done from server to server itself (kind of TestServer behaviour), without actual network activity or authorization policy applied.

Is there way to do it? I was using HttpServer as HttpMessageHandler on full .NET, but it's not the case with .NET Core.

EDIT: Here is a sample app, which fails on Autoruns service. https://github.com/Lonli-Lokli/middleware_example

1 Answers

What I think you’re looking for is the HttpClientFactory.. But, you’ll probably need to provide more details (code example of what you have tried) if you want a more complete answer

Related