* About http-post
@ 2010-07-03 19:41 Qiang Guo
2010-07-03 20:27 ` Ken Hori
0 siblings, 1 reply; 4+ messages in thread
From: Qiang Guo @ 2010-07-03 19:41 UTC (permalink / raw)
To: Emacs mailing list
Hi
Does anyone ever use Google login service in emacs ? It
says that you need to post to its login server, so I tried
the following code:
++---------------------------------------------
(let ((url-request-method "POST")
(url-request-extra-headers `(("Content-Type" . "application/x-www-form-urlencoded")))
(url-request-data "accountType=HOSTED_OR_GOOGLE&Email=xx@gmail.com&Passwd=xx"))
(with-current-buffer (url-retrieve-synchronously "https://www.google.com/accounts/ClientLogin")
(buffer-string)))
++---------------------------------------------
However, the code hangs after openning connection and never
revive. What's the problem here ?
Also, does url-retrieve-synchronously have some time-out
function, so it doesn't have to wait forever !
Thanks
Qiang
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: About http-post
2010-07-03 19:41 About http-post Qiang Guo
@ 2010-07-03 20:27 ` Ken Hori
2010-07-03 20:30 ` Qiang Guo
0 siblings, 1 reply; 4+ messages in thread
From: Ken Hori @ 2010-07-03 20:27 UTC (permalink / raw)
To: Qiang Guo; +Cc: Emacs mailing list
Maybe you are aware of it, but you will be sending your password in
plaintext with that POST request, you know.
Are you sure that's what you want? I thought they provided more secure
method of authenticating your identity (with oouth or whatever).
On Sat, Jul 3, 2010 at 12:41 PM, Qiang Guo <mcknight0219@gmail.com> wrote:
> Hi
>
> Does anyone ever use Google login service in emacs ? It
> says that you need to post to its login server, so I tried
> the following code:
> ++---------------------------------------------
> (let ((url-request-method "POST")
> (url-request-extra-headers `(("Content-Type" . "application/x-www-form-urlencoded")))
> (url-request-data "accountType=HOSTED_OR_GOOGLE&Email=xx@gmail.com&Passwd=xx"))
> (with-current-buffer (url-retrieve-synchronously "https://www.google.com/accounts/ClientLogin")
> (buffer-string)))
> ++---------------------------------------------
> However, the code hangs after openning connection and never
> revive. What's the problem here ?
>
> Also, does url-retrieve-synchronously have some time-out
> function, so it doesn't have to wait forever !
>
> Thanks
>
> Qiang
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: About http-post
2010-07-03 20:27 ` Ken Hori
@ 2010-07-03 20:30 ` Qiang Guo
2010-07-03 20:37 ` Ken Hori
0 siblings, 1 reply; 4+ messages in thread
From: Qiang Guo @ 2010-07-03 20:30 UTC (permalink / raw)
To: Ken Hori; +Cc: Emacs mailing list
Thanks for your heads-up. Still, I'm wondering what's wrong
with this method, though unsafe as it is ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: About http-post
2010-07-03 20:30 ` Qiang Guo
@ 2010-07-03 20:37 ` Ken Hori
0 siblings, 0 replies; 4+ messages in thread
From: Ken Hori @ 2010-07-03 20:37 UTC (permalink / raw)
To: Qiang Guo; +Cc: Emacs mailing list
Content-length is usually required in the header for POST requests,
though I haven't looked into it closely.
On Sat, Jul 3, 2010 at 1:30 PM, Qiang Guo <mcknight0219@gmail.com> wrote:
>
> Thanks for your heads-up. Still, I'm wondering what's wrong
> with this method, though unsafe as it is ?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-03 20:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-03 19:41 About http-post Qiang Guo
2010-07-03 20:27 ` Ken Hori
2010-07-03 20:30 ` Qiang Guo
2010-07-03 20:37 ` Ken Hori
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.