Twilio API and capitalized parameters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Twilio API and capitalized parameters

Adam Stokar
Hi everyone,

I'm having a binding issue using the Twilio api (SMS sending service).

The parameters come in as shown below.  Since they start with capital letters, Stripes default binding mechanism is not working as it expects the parameters to be in camel case, i.e. accountSid.  Is there a simple workaround for this?  I'm assuming that the getters and setters aren't working because they don't map exactly to the camel case version of the parameters.  Thanks.

AccountSid AC296de75a472e0b68fa0a85432f3ea301 
MessageSid SM760b2008c62485500dc44824a0a32128 
Body Howdy 
FromState PA 
ToCity AUSTIN 
ToZip 78722 
SmsSid SM760b2008c62485500dc44824a0a32128 
ToState TX 
To +15127828698 
ToCountry US 
FromCountry US 
SmsMessageSid SM760b2008c62485500dc44824a0a32128 
ApiVersion 2010-04-01 
FromCity PHILADELPHIA 
SmsStatus received 
NumMedia 0 
From +12158470493 
FromZip 19109

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Twilio API and capitalized parameters

samaxes
You will probably need to get them directly from the request: request.getParameter()



On Wed, Nov 6, 2013 at 11:09 PM, Adam Stokar <[hidden email]> wrote:
Hi everyone,

I'm having a binding issue using the Twilio api (SMS sending service).

The parameters come in as shown below.  Since they start with capital letters, Stripes default binding mechanism is not working as it expects the parameters to be in camel case, i.e. accountSid.  Is there a simple workaround for this?  I'm assuming that the getters and setters aren't working because they don't map exactly to the camel case version of the parameters.  Thanks.

AccountSid AC296de75a472e0b68fa0a85432f3ea301 
MessageSid SM760b2008c62485500dc44824a0a32128 
Body Howdy 
FromState PA 
ToCity AUSTIN 
ToZip 78722 
SmsSid SM760b2008c62485500dc44824a0a32128 
ToState TX 
To <a href="tel:%2B15127828698" value="+15127828698" target="_blank">+15127828698 
ToCountry US 
FromCountry US 
SmsMessageSid SM760b2008c62485500dc44824a0a32128 
ApiVersion 2010-04-01 
FromCity PHILADELPHIA 
SmsStatus received 
NumMedia 0 
From <a href="tel:%2B12158470493" value="+12158470493" target="_blank">+12158470493 
FromZip 19109

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users