|
@@ -256,8 +256,8 @@ is replaced with replacement."
|
|
|
(setf (quri:uri-scheme uri) "http"))
|
|
(setf (quri:uri-scheme uri) "http"))
|
|
|
(values uri userinfo)))
|
|
(values uri userinfo)))
|
|
|
|
|
|
|
|
-(defun http-request (url &rest args &key method version parameters content headers basic-auth cookie-jar keep-alive use-connection-pool (max-redirects 5) timeout force-binary want-stream ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent)
|
|
|
|
|
- (declare (ignore method version content basic-auth cookie-jar keep-alive use-connection-pool max-redirects timeout force-binary want-stream ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path))
|
|
|
|
|
|
|
+(defun http-request (url &rest args &key method version parameters content headers basic-auth cookie-jar keep-alive use-connection-pool (max-redirects 5) read-timeout force-binary want-stream ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent)
|
|
|
|
|
+ (declare (ignore method version content basic-auth cookie-jar keep-alive use-connection-pool max-redirects read-timeout force-binary want-stream ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path))
|
|
|
(multiple-value-bind (uri userinfo)
|
|
(multiple-value-bind (uri userinfo)
|
|
|
(http-default url parameters)
|
|
(http-default url parameters)
|
|
|
(when userinfo
|
|
(when userinfo
|
|
@@ -272,8 +272,8 @@ is replaced with replacement."
|
|
|
(apply #'dex:request uri :headers headers args)))
|
|
(apply #'dex:request uri :headers headers args)))
|
|
|
|
|
|
|
|
;; XML processing
|
|
;; XML processing
|
|
|
-(defun xml-request (url &rest args &key method parameters content headers basic-auth cookie-jar keep-alive use-connection-pool timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent encoding)
|
|
|
|
|
- (declare (ignore method parameters headers content basic-auth cookie-jar keep-alive use-connection-pool timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent))
|
|
|
|
|
|
|
+(defun xml-request (url &rest args &key method parameters content headers basic-auth cookie-jar keep-alive use-connection-pool read-timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent encoding)
|
|
|
|
|
+ (declare (ignore method parameters headers content basic-auth cookie-jar keep-alive use-connection-pool read-timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent))
|
|
|
(remf args :encoding)
|
|
(remf args :encoding)
|
|
|
(multiple-value-bind (raw-body status headers uri)
|
|
(multiple-value-bind (raw-body status headers uri)
|
|
|
(apply #'http-request url :force-binary t args)
|
|
(apply #'http-request url :force-binary t args)
|
|
@@ -349,8 +349,8 @@ is replaced with replacement."
|
|
|
(when text (trim-nil (plump:text (plump:parse text)))))
|
|
(when text (trim-nil (plump:text (plump:parse text)))))
|
|
|
|
|
|
|
|
;; JSON processing
|
|
;; JSON processing
|
|
|
-(defun json-request (url &rest args &key method parameters content headers basic-auth cookie-jar keep-alive use-connection-pool timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent (object-as :alist) json-content)
|
|
|
|
|
- (declare (ignore method parameters basic-auth cookie-jar keep-alive use-connection-pool timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent))
|
|
|
|
|
|
|
+(defun json-request (url &rest args &key method parameters content headers basic-auth cookie-jar keep-alive use-connection-pool read-timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent (object-as :alist) json-content)
|
|
|
|
|
+ (declare (ignore method parameters basic-auth cookie-jar keep-alive use-connection-pool read-timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent))
|
|
|
(when (and (consp content) json-content)
|
|
(when (and (consp content) json-content)
|
|
|
(setf content (with-output-to-string (s) (yason:encode-alist content s)))
|
|
(setf content (with-output-to-string (s) (yason:encode-alist content s)))
|
|
|
(push (cons :content-type "application/json") headers))
|
|
(push (cons :content-type "application/json") headers))
|