On Tue, Aug 24, 2021 at 6:32 PM Calle Andersson
wrote:
>
> I finally found a solution to my problem. It turned out 'contentTypeHeader'
> could be set to 'false' in the following simple way:
> restConfiguration().dataFormatProperty("contentTypeHeader", "false")...
>
> Now I am able to return respo
I finally found a solution to my problem. It turned out 'contentTypeHeader'
could be set to 'false' in the following simple way:
restConfiguration().dataFormatProperty("contentTypeHeader", "false")...
Now I am able to return responses with custom Content-Type values.
As a complement to my last answer, one of the reasons I want to set a custom
Content-Type value is because we include versioning in our custom media types
(I skipped this part to simplify my example code in earlier mails). We simply
want to use Content-Type to show the type and version of the da
Thanks for the answer,
The REST service is always called with the HTTP "Accept" header set as one of
the custom media types ("application/my.dummy.mediatype+xml" or
"application/my.dummy.mediatype+json"). The REST DSL based route uses the value
of that HTTP header to populate the "Accept" heade
Hi
Are you sure you want to set the Content-Type: Accept
I think this is wrong.
The content type is what the structure of the message body is, such as
xml, plain text, json, etc.
However there is a HTTP Accept header that a client can use to tell
the server what content-type the client can accep