[opensource] Google Voice AJAX/POST
swaneybr at opensource.osu.edu
Tue Jul 27 15:47:35 EDT 2010
What I'm looking for is an example of correctly formed POST input. I
have a cross-site POST AJAX script, but I'm getting the indication it is
not correctly formed, so I want to look at a correctly formed form
submission to see what I'm doing wrong.
The problem with Python or the like the affected page is on the CSE
and forms, and the data is submitted to client4.google.com.
On 07/26/2010 09:02 PM, Michael S. Yanovich wrote:
> I'm not sure if this would be of help, but at one time I was looking
> for a Python wrapper that interfaced with Google Voice. I came across
> this: http://code.google.com/p/pygooglevoice/
> I'm not familiar with how it authenticates with Google, but I've
> tested it with a spare account and it seems to work quite well.
> Hope this helps.
> On 07/23/2010 09:22 PM, Brian Swaney wrote:
>> So, the question is, what would a correctly-formated POST request
>> look like?
>> Thanks Paul, I'll see if I can find one of those. I think the script
>> I have can work, but I need an example of proper POST data to compare
>> with what I have. It looks like most of the one's I'm finding in
>> Google are using the included Flash embed, which is the opposite of
>> what I want, but I suppose there is bound to be one using AJAX
>> On 07/23/2010 07:47 PM, Shaun Brady wrote:
>>> When you construct a URL it's actually GET data. You have to put them
>>> (your POST variables) in to the HTTP header. This is just another
>>> this. I'm 99% you can control whether the request is via GET or POST,
>>> but how to modify the POST data, that I'm not sure of.
>>> On Fri, Jul 23, 2010 at 7:38 PM, Brian Swaney
>>> <swaneybr at opensource.osu.edu> wrote:
>>>> 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
>>>> name and phone number to "call" you, but never actually get your phone
>>>> number (even your Google number). I thought it seemed pretty neat,
>>>> that the widget is a Flash object, and is not customizable in the
>>>> least bit.
>>>> A Google search turned up an article
>>>> 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
>>>> 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
>>>> 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
>>>> 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
>>>> Opensource at cse.ohio-state.edu
> Opensource mailing list
> Opensource at cse.ohio-state.edu
Open Source Club at
Ohio State University
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Opensource