From 183b1a7010436ec309f85a4444c1bdbc872afa72 Mon Sep 17 00:00:00 2001 From: Elis Axelsson Date: Mon, 19 Sep 2016 20:25:34 +0200 Subject: [PATCH] Construct post data correctly --- webpaste.el | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/webpaste.el b/webpaste.el index 20a6a3d..14c0cc1 100644 --- a/webpaste.el +++ b/webpaste.el @@ -66,14 +66,18 @@ (defun webpaste-providers-ix.io (text) "Paste TEXT to http://ix.io/." - ;; Use request.el to do request to ix.io to submit data - (request "http://ix.io/" - :type "POST" - :data '(("f:1" . text)) - :parser 'buffer-string - :success (function* (lambda (&key data &allow-other-keys) - (when data - (webpaste-return-url data))))) + (let ((post-data '())) + ;; Construct post data + (add-to-list 'post-data (cons "f:1" text)) + + ;; Use request.el to do request to ix.io to submit data + (request "http://ix.io/" + :type "POST" + :data post-data + :parser 'buffer-string + :success (function* (lambda (&key data &allow-other-keys) + (when data + (webpaste-return-url data)))))) nil)