Skip to content

ClientResource#post different behaviors #807

Open
@loicoudot

Description

@loicoudot

I've configured my ClientResource to prefer JSON.
When i use this method: public <T> T post(Object entity, Class<T> resultClass) the entity is correctly wrapped in a JacksonRepresentation object by the toRepresentation internal method.
But, with the method: public Representation post(Object entity) the entity is incorectly wrapped in a JaxbRepresentation.
In the first case toRepresentation is called with getConnegService().getPreferredVariant(...) and in the second case the Variant is NULL.
Is this a normal behavior ?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions