emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: Re: Wanted: volunteer to integrate REST-client (restclient.el)
Date: Mon, 10 Feb 2014 14:13:42 +0100	[thread overview]
Message-ID: <2014-02-10T14-07-33@devnull.Karl-Voit.at> (raw)
In-Reply-To: CAJ51ETrd-zi0UDLaunGkz_2PzCyuHFYFUhtwZez6HJkbdRhA4w@mail.gmail.com

Hi John!

* John Kitchin <jkitchin@andrew.cmu.edu> 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

  reply	other threads:[~2014-02-10 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 13:35 Wanted: volunteer to integrate REST-client (restclient.el) Karl Voit
2014-02-09  0:18 ` John Kitchin
2014-02-10 13:13   ` Karl Voit [this message]
2014-02-10 15:59     ` John Kitchin
2014-02-12 15:02       ` OT: installing pip on Windows/Cygwin (was: Wanted: volunteer to integrate REST-client (restclient.el)) Karl Voit
2014-02-12 16:12         ` Karl Voit
2014-02-12 17:08         ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2014-02-10T14-07-33@devnull.Karl-Voit.at \
    --to=devnull@karl-voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).