microsoft-graph-devx-api icon indicating copy to clipboard operation
microsoft-graph-devx-api copied to clipboard

Snippet generation needs to specify Content-type header if it is not default.

Open zengin opened this issue 5 years ago • 2 comments

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 will need:

.Request(new IEnumerable<HeaderOption> (Content-type: "application/zip")

instead of only:

.Request()

so that we can override the default stream content type application/octet-stream with application/zip.

AB#6994

zengin avatar Oct 14 '20 19:10 zengin

Related: https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/issues/160

zengin avatar Oct 14 '20 19:10 zengin

The TeamsApp metadata needs to be updated to include HasStream=true. The following scenario also needs this:

https://docs.microsoft.com/en-us/graph/api/teamsapp-publish?view=graph-rest-1.0

MIchaelMainer avatar Oct 14 '20 20:10 MIchaelMainer