I am trying to understand why the API cannot see what assignments I am making in the middleware of the Website.
public async Task InvokeAsync(HttpContext httpContext) { try { httpContext.Request.Headers.SetCookie = new StringValues("some cookie"); } catch() { } }
When I pick up the API call with HttpContextAccessor it never has the values in the website assigned.
What are possible causes of this? I just don't get it.
The web has the values in the HttpRequest when it leaves the method.
Please help me understand how I can send a value to the API from the web.
Thanks in advance.
