Permalink
Browse files

define param-list in post/put-request function

  • Loading branch information...
1 parent ddec086 commit b75801375c486fd427016c583d49b06d8d98eaa4 @shawnps committed May 21, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 mygengo.rkt
View
@@ -61,15 +61,17 @@
(define api-sig-and-ts (get-api-sig-and-ts mygengo-user))
(define api-sig (first api-sig-and-ts))
(define ts (last api-sig-and-ts))
+ (define param-list
+ (list api-sig
+ ts
+ `(api_key . ,(mygengo-public-key mygengo-user))
+ `(data . ,data)))
(read-json
(post-or-put-pure-port
(string->url (string-append base-url method))
(string->bytes/locale
(alist->form-urlencoded
- (list
- api-sig ts
- (cons 'api_key (mygengo-public-key mygengo-user))
- (cons 'data data))))
+ param-list))
'("Accept:application/json"
"Content-Type:application/x-www-form-urlencoded"))))

0 comments on commit b758013

Please sign in to comment.