Skip to content

Commit

Permalink
support content-negotiation for languages (issue #32)
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed Apr 16, 2015
1 parent e527979 commit 143f118
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions paia.md
Expand Up @@ -164,8 +164,12 @@ suppress_response_codes

## HTTP headers

Clients SHOULD include an approriate `User-Agent` request header with client
name and version.
Clients SHOULD send an approriate `User-Agent` request header with client
name and version.

Clients MAY send an `Accept-Language` header to indicate preferred languages of
textual response fields. A PAIA server SHOULD include a `Content-Language`
header to indicate the language of textual response fields.

The HTTP response content type of a PAIA response is a JSON object (HTTP header
`Content-Type: application/json`) in UTF8, optionally wrapped as JSONP (HTTP
Expand Down

1 comment on commit 143f118

@JonathanRowell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bibdia's current OPAC, which contains the user functions which this specification is trying to standardize, allows the user to select his language from the start. Living in France using a German browser I never get the language that I require - English - because everybody keeps second guessing me.

What I dislike about this specification is it's inconsistancy. Parameters - that is information which the user is sending to the server in order to perform a function - are inconsistantly encoded. Partly in the URL, partly as conventional parameters (after ? in the URL or as xxx-urlencoded POST or a JSON) and also hidden from view in HTTP headers - Accept-Language and Bearer Tokens for example. I'd put all these parameters in a conventional GET/POST request returning JSON data. An AngularJS service to support this would be quite simple to write.

Please sign in to comment.