Allow application/zip as a valid stream Content-Type if explicitly specified
This is to support C# snippet generation for the following HTTP snippet:
https://docs.microsoft.com/en-us/graph/api/teamsapp-update?view=graph-rest-1.0&tabs=http#request
PUT https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/06805b9e-77e3-4b93-ac81-525eb87513b8
Content-type: application/zip
Content-length: 244
[Zip file containing a Teams app package]
We need a check here that Content-Type is not already set before to prevent always assuming application/octet-stream: https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/blob/dev/src/Microsoft.Graph.Core/Requests/BaseRequest.cs#L257
AB#7184
Note to self that the generated API sets the ContentType to default octet-stream for HasStream. If a customer sets HeaderOption for ContentType in .Request(), we must use that value instead of the generated default value
- [ ] Open issues on Java, JS, and PowerShell.
cc:/ @peombwa @nikithauc @baywet
Closing this one for now.
If the content type is specified explicitly in a RequestInformation instance in its header collection, the Kiota abstractions will not override the header