Skip to content

application/hal+json is used, but it's non-standard #2276

@Tachi107

Description

@Tachi107

Hi,

spring-hateoas uses the application/hal+json media type, but no such media type is registered with IANA. The standard media type is application/vnd.hal+json (note the "vnd." prefix).

The docs mention that if the client sets the Accept header to application/hal+json, Spring will return the HAL representation of the resource. In my opinion, such representation should be returned also if the (registered) application/vnd.hal+json media type is used instead.

Here's the relevant documentation section:

If you returned such an instance from a Spring MVC or WebFlux controller and the client sent an `Accept` header set to `application/hal+json`, the response would look as follows:

Bye!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions