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

Nap should default accept header to */* #32

Open
mstade opened this issue Nov 11, 2015 · 2 comments
Open

Nap should default accept header to */* #32

mstade opened this issue Nov 11, 2015 · 2 comments

Comments

@mstade
Copy link
Member

mstade commented Nov 11, 2015

Currently, nap sets the accept header to application/x.nap.view whenever it's not defined. This should change to set it to */* instead.

@mstade mstade changed the title Nap should set accept header to */* when it's missing Nap should default accept header to */* Nov 11, 2015
@mstade
Copy link
Member Author

mstade commented Nov 11, 2015

For resources with multiple representations, what heuristics should nap use to determine which representation to use? Whatever comes first? It probably makes sense to implement some sort of order, much like how browsers have default accept strings for requests – e.g. Chrome sends text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8.

@mstade
Copy link
Member Author

mstade commented Nov 18, 2015

Thinking about this some more it might be useful to prioritize text/html in the accept type, and make it trivial to implement a kind of options html resource that explains the interface of the resource. I think this could be a boon to discoverability, especially if combined with the thoughts in #8 and #22 with regards to registering and looking up resources using the same request mechanisms as anything else. Need some further thought to come up with ideas on what this might look like though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant