Skip to content

Commit

Permalink
Use built-in query building function
Browse files Browse the repository at this point in the history
  • Loading branch information
basil-conto committed Jun 11, 2017
1 parent 715dfef commit 8d5b9a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ghub.el
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ in which case return nil."
(nconc body
(ghub--request method resource
(cons (cons 'page link)
(cl-delete 'page params :key #'car))
(assq-delete-all 'page params))
data noerror))
body)))))

Expand All @@ -218,10 +218,10 @@ in which case return nil."
(json-read))))

(defun ghub--url-encode-params (params)
(mapconcat (pcase-lambda (`(,key . ,val))
(concat (url-hexify-string (symbol-name key)) "="
(url-hexify-string val)))
params "&"))
(url-build-query-string
(mapcar (lambda (param)
(list (car param) (cdr param)))
params)))

(defun ghub--basic-auth ()
(let ((url (url-generic-parse-url ghub-base-url)))
Expand Down

0 comments on commit 8d5b9a9

Please sign in to comment.