Skip to content

Allow to set HTTP headers by key and value easily #1198

Open
@davsclaus

Description

@davsclaus

Using restlet got a lot harder due setting and reading http headers uses a whole range of methods
https://restlet.com/technical-resources/restlet-framework/guide/2.3/core/http-headers-mapping

It would be good to have a normal single method as well where you can get or set a header using a key and value. And allows clients to not have a gazillion if .. else to figure out which restlet setter method to call for setting an Accept header etc.

Response response = ...
response.setHeader("Content-Type", "application/json");
...

Then you can under the hood do the dancing and figure or what to do on behalf of the client.

Its really tiresome to have to add a gazillion if else and whatnot logic to be able to support all those restlet http header methods.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions