help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WEB development with Emacs: HTTP GET and POST


From: Xah
Subject: Re: WEB development with Emacs: HTTP GET and POST
Date: Fri, 20 Jun 2008 19:03:05 -0700 (PDT)
User-agent: G2/1.0

Not sure exactly what is your question. Here's few tips:

• define system wide shortcuts that switch to specific apps. e.g. for
me, F6 is FireFox, F7 is emacs.

• Most PC keyboards has a Menu key. (usually on the right hand side,
between Alt and Ctrl.) This key can be set to switch to the last App.
Since most app switching is to the previous apps, this key is useful
that way.

• In emacs, you can set a shortcut to view the current file in
browser. For me, that is currently set to F8.
e.g.
...html-mode-hook...
 (define-key html-mode-map (kbd "<f8>") 'browse-url-of-buffer)

• If you want a elisp lib to do HTTP query, there's http-cookies.el,
http-get.el, http-post.el
at
   http://savannah.nongnu.org/cgi-bin/viewcvs/http-emacs/http-emacs/

These are used by LiveJournal mode that allows me to post blogs to lj
within emacs, which works well for me. I believe there are other http
protocol elisp code...

There are emacs mode to post to blogger, Wikipedia... not sure what
they use. You can check emacs wiki.

• Alternatively, you can trivially write a elisp wrapper that calls
shell's lynx curl, wget, or perl's GET, etc that returns its output
and display it in a buffer. If you need the code, give us a hollar. Or
check out my elisp tutorial on my site.

  Xah
∑ http://xahlee.org/

☄




On Jun 20, 12:28 pm, "Anton V. Belyaev" <address@hidden>
wrote:
> Hello all,
>
> I am looking for a way to make HTTP requests from Emacs and see the
> response.
>
> I've been doing WEB development for a while and found myself switching
> constantly from Emacs to Firefox and back: write a piece of web
> handler in Emacs - check with Firefox how it works.
>
> This is quite reasonable when HTTP response is an HTML page.
>
> But now I mostly work with JSON and XML - just text formats and
> Firefox shows them as is. Emacs could do the same.
>
> I guess there are many WEB developers among Emacs users. And someone
> might have solved the problem already. What is the best recipe to do
> this?
>
> Thanks,
> Anton.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]