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

HTTP Accept header #9

Open
Zarquan opened this issue May 21, 2021 · 1 comment
Open

HTTP Accept header #9

Zarquan opened this issue May 21, 2021 · 1 comment

Comments

@Zarquan
Copy link
Member

Zarquan commented May 21, 2021

The UWS specification has the following text:

HTTP allows multiple representations of a resource distinguished by their MIME types and selected by the HTTP "Accept" headers of a GET request. A UWS implementation can exploit this to support both web browsers and rich clients in the same tree of resources. Although the default behaviour is to return XML, a UWS could return HTML or XHTML to clients that accept these types. These clients are assumed to be web browsers and the UWS is generating its own user interface. The HTML interface generated should allow full control of the UWS via the use of HTML forms and appropriate links.

Should this be moved to DALI and made consistent across all DAL services ?

@pdowler
Copy link
Collaborator

pdowler commented Sep 8, 2021

It could... any service can support this already so would it add much to say so in DALI? The first thing that would happen is confusion between Accept header and the RESPONSEFORMAT parameter. The latter is usable to control the representation format of async job results, while Accept is only applicable to the current http request/response.

If we aren't careful, we just make it such that TAP-async has one way to control output form and TAP-sync has two ways; then we also have to decide which one "wins" of both are present and also spec compliance issues (I'm sure).

My personal 2c: we use Accept (at CADC) where it makes sense (mainly to support our own web UI) but I'd be cautious about mentioning it in a DALI; in a standard about a specific endpoint behaviour with a defined payload (eg UWS) it makes some sense to mention it, but even in the above quote it's clearly optional with no way to discover that a service does something with Accept headers and what mime types might actually work (othwer than the http way of sending accept header and seeing what comes back)

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

2 participants