* WEB development with Emacs: HTTP GET and POST @ 2008-06-20 19:28 Anton V. Belyaev 2008-06-20 20:35 ` weber ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: Anton V. Belyaev @ 2008-06-20 19:28 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WEB development with Emacs: HTTP GET and POST 2008-06-20 19:28 WEB development with Emacs: HTTP GET and POST Anton V. Belyaev @ 2008-06-20 20:35 ` weber 2008-06-20 20:44 ` Jason Rumney ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: weber @ 2008-06-20 20:35 UTC (permalink / raw) To: help-gnu-emacs On Jun 20, 4:28 pm, "Anton V. Belyaev" <anton.bely...@gmail.com> 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. Perhaps this can help you (http-twiddle.el): http://groups.google.com/group/gnu.emacs.sources/browse_thread/thread/51d4aac3f0ac2ba9/d31c566141c09927?lnk=st&q=http-twiddle.el#d31c566141c09927 Cheers, weber ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WEB development with Emacs: HTTP GET and POST 2008-06-20 19:28 WEB development with Emacs: HTTP GET and POST Anton V. Belyaev 2008-06-20 20:35 ` weber @ 2008-06-20 20:44 ` Jason Rumney 2008-06-21 2:03 ` Xah 2008-06-21 3:10 ` Bastien 3 siblings, 0 replies; 5+ messages in thread From: Jason Rumney @ 2008-06-20 20:44 UTC (permalink / raw) To: help-gnu-emacs On Jun 20, 8:28 pm, "Anton V. Belyaev" <anton.bely...@gmail.com> wrote: > Hello all, > > I am looking for a way to make HTTP requests from Emacs and see the > response. Try M-x browse-url-emacs. If you want to browse urls that are in the buffer you are editing, then you might want to customize ffap-url-fetcher to this instead of the default browse-url, and use ffap to open the url. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WEB development with Emacs: HTTP GET and POST 2008-06-20 19:28 WEB development with Emacs: HTTP GET and POST Anton V. Belyaev 2008-06-20 20:35 ` weber 2008-06-20 20:44 ` Jason Rumney @ 2008-06-21 2:03 ` Xah 2008-06-21 3:10 ` Bastien 3 siblings, 0 replies; 5+ messages in thread From: Xah @ 2008-06-21 2:03 UTC (permalink / raw) To: help-gnu-emacs 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" <anton.bely...@gmail.com> 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WEB development with Emacs: HTTP GET and POST 2008-06-20 19:28 WEB development with Emacs: HTTP GET and POST Anton V. Belyaev ` (2 preceding siblings ...) 2008-06-21 2:03 ` Xah @ 2008-06-21 3:10 ` Bastien 3 siblings, 0 replies; 5+ messages in thread From: Bastien @ 2008-06-21 3:10 UTC (permalink / raw) To: help-gnu-emacs "Anton V. Belyaev" <anton.belyaev@gmail.com> writes: > I am looking for a way to make HTTP requests from Emacs and see the > response. Look for http-get.el and http-post.el -- it should be on the Emacswiki. -- Bastien ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-06-21 3:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-06-20 19:28 WEB development with Emacs: HTTP GET and POST Anton V. Belyaev 2008-06-20 20:35 ` weber 2008-06-20 20:44 ` Jason Rumney 2008-06-21 2:03 ` Xah 2008-06-21 3:10 ` Bastien
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).