app-restconsole icon indicating copy to clipboard operation
app-restconsole copied to clipboard

Vendor media types not recognised

Open jmerhar opened this issue 12 years ago • 5 comments

Vendor media types (http://tools.ietf.org/html/rfc4288#section-3.2) are the preferred method for REST API versioning according to many sources. However, when a service specifies a vendor media type in the Content-Type header, the Rest Console doesn't recognise it and doesn't parse the response accordingly.

Examples:

  1. Should be parsed as JSON: application/vnd.company.app1-v100+json
  2. Should be parsed as XML: application/vnd.company.app2-v250+xml

jmerhar avatar Feb 19 '13 09:02 jmerhar

ah, that's a very good feature ... will certainly add that next!

ahmadnassri avatar Feb 19 '13 16:02 ahmadnassri

Thanks, looking forward to it. And thanks for a great tool, it's invaluable for testing REST APIs.

jmerhar avatar Feb 19 '13 18:02 jmerhar

I've noticed another very strange, seemingly related bug:

  1. I make a POST request with Content-Type "application/x-www-form-urlencoded" and Accept set to a vendor media type.
  2. The request executes fine and the server returns a response with Content-Type set to the same vendor media type.
  3. I then press "Send" again, with exactly the same settings, and the Content-Type header is no longer sent with the request.
  4. This happens for every subsequent request until I change the Content-Type of the response to something like "text/html". After that it starts working again.

Does the Content-Type response header of the previous request somehow affect the Content-Type request header of the next one?

jmerhar avatar Feb 21 '13 09:02 jmerhar

interesting ... I see no reason for that behaviour, none that would be related to the response content type ... can you please open a separate ticket for this (easier to track)

I know I keep sounding like a broken record, but new version is coming soon, its a complete rewrite adding many many many new features and allowing for better debugging of issues like these!

ahmadnassri avatar Feb 21 '13 16:02 ahmadnassri

OK, I opened a new ticket. It seemed somehow related to this one, but it could also be completely unrelated.

jmerhar avatar Feb 21 '13 17:02 jmerhar