AzureAD / microsoft-identity-web

Helps creating protected web apps and web APIs with Microsoft identity platform and Azure AD B2C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Honor AcceptHeader and a ContentType in DownstreamApi

jmprieur opened this issue · comments

Why?
Services need to be able to provide the content-type of the body they provide when calling a downstream API. They also need to be able to declare what they expect.

See AzureAD/microsoft-identity-abstractions-for-dotnet#123

Describe the solution you'd like
In DownstreamApi.cs;

  • here:

    • add an AcceptHeader to the message based on the content of the new option in abstraction
    • if (content is not null, and ContentType is not null or empty, add a ContentType header to the message)
  • here, only use the json serializer of the AcceptHeader is Json.