From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Wanted: volunteer to integrate REST-client (restclient.el) Date: Mon, 10 Feb 2014 14:13:42 +0100 Message-ID: <2014-02-10T14-07-33@devnull.Karl-Voit.at> References: <2014-02-07T14-30-02@devnull.Karl-Voit.at> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCqgS-0003U4-9T for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 08:14:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCqgN-0003G5-Jq for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 08:14:00 -0500 Received: from plane.gmane.org ([80.91.229.3]:54378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCqgN-0003Fz-Ci for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 08:13:55 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WCqgK-0000Zr-L9 for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 14:13:52 +0100 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Feb 2014 14:13:52 +0100 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Feb 2014 14:13:52 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi John! * John Kitchin wrote: > > I think you could do this via requests directly. It could be done in emacs: > https://github.com/tkf/emacs-request Thanks for the pointer. I evaluated it and it seems not that good for my requirements because I need it mainly for documenting stuff/issues/... With request.el, I need lots of lines per call whereas restclient.el needs only three lines which can be written, read, adopted pretty easily. > or python: http://docs.python-requests.org/en/latest/ > > In your case you could have a block like this: > > #+BEGIN_SRC python > import requests > headers = {"Authorization": "Basic YmVfcmVzdF9hZG1", > "Accept-Encoding": "application/xml"} > r = requests.get("http://myserver/rest/dothis", headers=headers) > print r.text > #+END_SRC This would be completely OK to me. Unfortunately, cygwin does not come with "python-requests" and I failed at installing "pip" on my Windows machine [1] :-( Probably restclient.el has also a unique feature which is neat for my purpose: pretty printing XML responses. So I guess I have to stick with my current method which is using the *scratch* buffer and manually switching to restclient-mode and copy&paste the request and the results from/to my Org-mode buffers. However, thanks for the great links! 1. "python get-pip.py" runs without error message but then I can not execute nor find pip(.exe) at all :-( -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github