FatFractal customer forums



Author Topic: Custom Code and Additional Parameters  (Read 2055 times)

jonnycools

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Custom Code and Additional Parameters
« on: January 23, 2014, 08:38:27 PM »
Not sure if this is possible right now.

I'd like to be able to associate an arbitrary dictionary or string with all requests to the server. My reason for this is in event handlers say a post handler on a retrieve, i'd like to be able to customize the object based on the value in that arbitrary string or dictionary.

This string may identify whether the request is coming from iOS or android. Or if I have multiple apps sharing a common FF backend it could identify the which app is the request coming from. I could provide this upon initialization of the FF instance or maybe as parameters in a query or extension. So on the server side I would retrieve the parameters in the event handler or extension.

Currently upon retrieval I store transient properties in an object, but I share the backend with three apps and the properties returned are unique to each.

For example

/Collection/(query)?app="identifier", latitude=0.23,longitude=0.45

I could do this but I am not sure if there is a function to retrieve the http parameters in event handlers

gkc

  • Administrator
  • *****
  • Posts: 375
    • View Profile
Re: Custom Code and Additional Parameters
« Reply #1 on: January 24, 2014, 09:29:13 PM »
I think the best way is to add custom http headers. That would currently work for server extensions; we will need to make the same thing available for event handlers. Give me a day or two to work this in to all the rest of the work in progress & I'll give you a release date

jonnycools

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Custom Code and Additional Parameters
« Reply #2 on: January 24, 2014, 09:48:24 PM »
No rush, just thinking this might be useful to give the cloud some context.

Thanks again for considering my endless demands

gkc

  • Administrator
  • *****
  • Posts: 375
    • View Profile
Re: Custom Code and Additional Parameters
« Reply #3 on: March 23, 2014, 01:09:10 PM »
Hi there: this is supported in release 1.3.0, just released. See http://fatfractal.com/prod/docs/getting-started/#release-notes

jonnycools

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Custom Code and Additional Parameters
« Reply #4 on: March 23, 2014, 01:12:22 PM »
Trolling the documentation as we speak. I like what I see.

 

Copyright © FatFractal customer forums