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

As a user, I want to get application/json response format by default if I request an API url in my browser #439

Closed
tloubrieu-jpl opened this issue Nov 30, 2022 · 3 comments
Assignees
Labels
B13.1 p.should-have requirement the current issue is a requirement

Comments

@tloubrieu-jpl
Copy link
Member

πŸ§‘β€πŸ”¬ User Persona(s)

πŸ’ͺ Motivation

...so that I can see well defined json and that possibly my browser plugin help me to explore it.

πŸ“– Additional Details

A plugin which should work on the API response is https://github.com/callumlocke/json-formatter

βš–οΈ Acceptance Criteria

Given an API request
When I perform it in a web browser (Google Chrome, Firefox, Safari)
Then I expect to get a parsable JSON, which is understood by plugin https://github.com/callumlocke/json-formatter for example

βš™οΈ Engineering Details

In my Google Chrome browser on macos the request comes with Accept header value "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9"

I guess we should make the API return application/json when such Accept header is received. Maybe we should identify application/json as text/html.

@tloubrieu-jpl tloubrieu-jpl added requirement the current issue is a requirement B13.1 labels Nov 30, 2022
@tloubrieu-jpl
Copy link
Member Author

I made it part of the swagger EPIC not to loose this minor ticket.

@tloubrieu-jpl
Copy link
Member Author

Hi @alexdunnjpl , I stole this ticket from you...

@alexdunnjpl
Copy link
Contributor

All yours!

@jordanpadams jordanpadams transferred this issue from NASA-PDS/pds-api May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B13.1 p.should-have requirement the current issue is a requirement
Projects
None yet
Development

No branches or pull requests

3 participants