[opensource] Google Voice AJAX/POST

Morgan Goose morgan.goose at gmail.com
Fri Jul 23 20:46:46 EDT 2010


Your could also use a micro framework like bottle.py to run a mini server with
it's ability to accept POST and GET requests. Could be useful in debugging, as
then you'd have them basically as values sent to the function's parameters.

Also don't know how that AJAX stuff translates things but the & notation looks
like a plain GET request to me.

goose

On Fri, Jul 23, 2010 at 05:27:04PM -0700, Richard Garris wrote:
>    Wireshark won't work on a post.
> 
>    But if you use a tool like TCP Proxy you can first send your request
>    through that then have it forward onto Google to get a snapshot of what
>    your POST request looks like.
> 
>    -RG
> 
>    On Fri, Jul 23, 2010 at 5:08 PM, Paul Betts <[1]paul at paulbetts.org> wrote:
> 
>      There are many open-source GVoice libraries - I'd just see how one of
>      them did it.
>      --
>      Paul Betts
> 
>      SENT FROM MY COMMODORE 64: RESPONSES MAY BE IN ALL CAPS
> 
>      Am Jul 23, 2010 um 16:38 schrieb Brian Swaney
>      <[2]swaneybr at opensource.osu.edu>:
>      > Does anyone have experience with submitting forms using POST data?
>      >
>      > A few months ago I subscribed to Google Voice, and it turns out they
>      provide a widget you can place on your web pages such that a user can
>      enter their name and phone number to "call" you, but never actually get
>      your phone number (even your Google number). I thought it seemed pretty
>      neat, except that the widget is a Flash object, and is not customizable
>      in the least bit.
>      >
>      > A Google search turned up an article
>      <[3]http://razvangavril.com/web-development/custom-google-voice-widget/>
>      detailing how the applet does nothing more than make a POST request,
>      which you can do yourself with some HTML forms. He (correctly) suggested
>      that you submit the data using AJAX instead of a regular submit button,
>      because otherwise the user will be redirected to a page that says
>      "ok=true", as I found myself.
>      >
>      > Problem is, I can't figure out how to properly form the POST request.
>      My script is at
>      [4]http://www.cse.ohio-state.edu/%7Eswaneybr/js/googlevoice.js and
>      according to Firebug it goes all the way through without errors, and
>      sends the POST request, but lists an empty response from Google. If I
>      use the forms alone, with a submit button and no javascript, the call
>      goes through and the user is redirected to a page that says ok=true, so
>      I know it works, but using the AJAX method nothing happens. I think I
>      might be forming the POST request wrong, but having never personally
>      dealt with POST before today I have no idea what it is supposed to look
>      like. Wireshark is out of the question because Google (wisely) uses SSL.
>      >
>      > My request looks like
>      >
>      buttonId=LOTS_OF_HEX_HERE&callerNumber=PHONE_NUMBER&name=SOMEBODY'S_NAME&showCallerNumber=1
>      > but that's obviously not working. Could somebody instruct me on how to
>      form a proper POST string to pass into ajaxRequest.send(POSTrequest);?
>      >
>      > --
>      > Brian Swaney
>      > Open Source Club at
>      > Ohio State University
>      > Website Administrator
>      >
>      > _______________________________________________
>      > Opensource mailing list
>      > [5]Opensource at cse.ohio-state.edu
>      > [6]http://mail.cse.ohio-state.edu/mailman/listinfo/opensource
> 
>      _______________________________________________
>      Opensource mailing list
>      [7]Opensource at cse.ohio-state.edu
>      [8]http://mail.cse.ohio-state.edu/mailman/listinfo/opensource
> 
> References
> 
>    Visible links
>    1. mailto:paul at paulbetts.org
>    2. mailto:swaneybr at opensource.osu.edu
>    3. http://razvangavril.com/web-development/custom-google-voice-widget/
>    4. http://www.cse.ohio-state.edu/%7Eswaneybr/js/googlevoice.js
>    5. mailto:Opensource at cse.ohio-state.edu
>    6. http://mail.cse.ohio-state.edu/mailman/listinfo/opensource
>    7. mailto:Opensource at cse.ohio-state.edu
>    8. http://mail.cse.ohio-state.edu/mailman/listinfo/opensource

> _______________________________________________
> Opensource mailing list
> Opensource at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/opensource

---end quoted text---


More information about the Opensource mailing list