Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all different content types and fallback to showing text #626

Closed
darrelmiller opened this issue Jul 2, 2020 · 4 comments · Fixed by #814
Closed

Support all different content types and fallback to showing text #626

darrelmiller opened this issue Jul 2, 2020 · 4 comments · Fixed by #814
Assignees
Labels
priority:p2 Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 days promote type:bug Something isn't working type:content-text Placing appropriate words

Comments

@darrelmiller
Copy link
Contributor

darrelmiller commented Jul 2, 2020

The default behavior should be to render as text. We should have a case for application/octet-stream that doesn't render it as text and just shows a message such as "Binary Response". Ideally this would allow a download of that binary response.

switch (contentType) {
case ContentType.Json:
return response.json();
case ContentType.XML:
return response.text();
case ContentType.TextPlain:
return response.text();
default:
return response;

This will fix the rendering of report endpoints that return text/csv and will future proof us for other text formats that might be used.
AB#6253

@Shjokie
Copy link
Contributor

Shjokie commented Jul 6, 2020

Related to this issue: #598

@thewahome
Copy link
Collaborator

@darrelmiller @bettirosengugi which endpoints can I call to test binary response queries?

@darrelmiller
Copy link
Contributor Author

If you search for "Edm.stream" in the metadata you will find endpoints that return binary payloads. Many of the report endpoints return text/CSV https://docs.microsoft.com/en-us/graph/reportroot-concept-overview
The OneNote APIs return and accept text/HTML

@thewahome
Copy link
Collaborator

If you search for "Edm.stream" in the metadata you will find endpoints that return binary payloads. Many of the report endpoints return text/CSV https://docs.microsoft.com/en-us/graph/reportroot-concept-overview
The OneNote APIs return and accept text/HTML

Thanks @darrelmiller

@ddyett ddyett added priority:p2 Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 days promote labels Sep 30, 2020
@thewahome thewahome added the CORS label Jan 29, 2021
Graph Explorer V4 automation moved this from To do to Done Feb 3, 2021
@adhiambovivian adhiambovivian added type:content-text Placing appropriate words and removed CORS labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p2 Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 days promote type:bug Something isn't working type:content-text Placing appropriate words
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants