Skip to content

Commit

Permalink
Update 406 response when an invalid version is requested.
Browse files Browse the repository at this point in the history
  • Loading branch information
bill dirks authored and hunterowens committed Jun 7, 2019
1 parent b43dbca commit ee4afd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Content-Type: application/vnd.mds.provider+json;version=0.3

> Since versioning was not added until the 0.3.0 release, if the `Content-Type` header is `application/json` or not set in the response, version `0.2` must be assumed.
If an unsupported or invalid version is requested, the API must respond with a status of `406 Not Acceptable`. In which case, the response should include a body specifying a list of supported versions.
If an unsupported or invalid version is requested, the API must respond with a status of `406 Not Acceptable`. If this occurs, a client can explicitly negotiate available versions.

A client can explicitly negotiate headers using the `OPTIONS` method to an MDS endpoint. For example, to check if `trips` supports either version `0.2` or `0.3` with a preference for `0.2`, the client would issue the following request:
A client negotiates available versions using the `OPTIONS` method to an MDS endpoint. For example, to check if `trips` supports either version `0.2` or `0.3` with a preference for `0.2`, the client would issue the following request:

```http
OPTIONS /trips/ HTTP/1.1
Expand Down

0 comments on commit ee4afd7

Please sign in to comment.