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

Closed
jcberquist opened this Issue Dec 18, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@jcberquist
Contributor

jcberquist commented Dec 18, 2015

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.

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Dec 23, 2015

Member

After looking at how controllers were invoked, it was easy enough to add headers as a second argument (third argument to onMissingMethod()). Now to update the documentation!

Member

seancorfield commented Dec 23, 2015

After looking at how controllers were invoked, it was easy enough to add headers as a second argument (third argument to onMissingMethod()). Now to update the documentation!

@seancorfield seancorfield self-assigned this Dec 23, 2015

@jccsbenjamin

This comment has been minimized.

Show comment
Hide comment
@jccsbenjamin

jccsbenjamin Jul 23, 2016

Has any progress on this. With xhr level2 this would be very helpful.

Has any progress on this. With xhr level2 this would be very helpful.

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Jul 25, 2016

Member

I'm not sure what you're asking -- this was implemented and documented as part of the 4.0.0 release cycle which is currently at Beta 2 status (and we've had 4.0.0 in production for months so I'd consider it very stable).

Member

seancorfield commented Jul 25, 2016

I'm not sure what you're asking -- this was implemented and documented as part of the 4.0.0 release cycle which is currently at Beta 2 status (and we've had 4.0.0 in production for months so I'd consider it very stable).

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Jul 26, 2016

Member

@jccsbenjamin ^ Just making sure you saw my comment?

Member

seancorfield commented Jul 26, 2016

@jccsbenjamin ^ Just making sure you saw my comment?

@jccsbenjamin

This comment has been minimized.

Show comment
Hide comment
@jccsbenjamin

jccsbenjamin Jul 28, 2016

Thank, you.

On Mon, Jul 25, 2016 at 10:28 AM, Sean Corfield notifications@github.com
wrote:

I'm not sure what you're asking -- this was implemented and documented as
part of the 4.0.0 release cycle which is currently at Beta 2 status (and
we've had 4.0.0 in production for months so I'd consider it very stable).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#411 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMb6iQMslC_4FvkjqSjhGcckR-uSvtVFks5qZPI_gaJpZM4G32vw
.

Thank, you.

On Mon, Jul 25, 2016 at 10:28 AM, Sean Corfield notifications@github.com
wrote:

I'm not sure what you're asking -- this was implemented and documented as
part of the 4.0.0 release cycle which is currently at Beta 2 status (and
we've had 4.0.0 in production for months so I'd consider it very stable).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#411 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMb6iQMslC_4FvkjqSjhGcckR-uSvtVFks5qZPI_gaJpZM4G32vw
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment