Skip to content

Request header handling in FW/1 v4.0 #411

@jcberquist

Description

@jcberquist

With the increased focus on REST support coming in FW/1 v4, it could be a good idea for the framework to provide access to request headers. It is true that it is easy to get at request headers via the getHttpRequestData() method. However, I think it would be appropriate for the framework to add a framework specific way for handling headers, since it is highly likely that any REST API is going to need to access request headers. (Just as FW/1 provides easy and framework specific access to FORM and URL scope variables in the rc struct today.)

A couple of possibilities are:

  • adding a new getHeader() method, that controllers can use to access specific headers
  • passing a headers struct to controller methods as a second argument so that controller methods would have the form controllermethod( rc, headers ) {}

I would be interested in any feedback or thoughts that people have.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions