From 6835883940f67b9fe34b0a7d47c52cf8a9b27407 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 29 Aug 2018 16:17:32 +0200 Subject: debbugs: soap-invoke: Stream response. * debbugs/soap.scm (soap-invoke): Stream the POST response. --- debbugs/soap.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debbugs/soap.scm b/debbugs/soap.scm index 27c5fce..e186334 100644 --- a/debbugs/soap.scm +++ b/debbugs/soap.scm @@ -98,15 +98,16 @@ response body." (req-xml (call-with-output-string (lambda (port) (sxml->xml (soap-request-body request) port))))) - (receive (response body) + (receive (response body-port) (http-post uri #:body req-xml #:headers `((content-type . (text/xml)) (content-length . ,(string-length req-xml))) + #:streaming? #t #:decode-body? #t) ((soap-request-callback request) - (xml->sxml body #:trim-whitespace? #t))))) + (xml->sxml body-port #:trim-whitespace? #t))))) (define (soap-invoke* . args) "Cache the return value of SOAP-INVOKE. Return the cached value if -- cgit v1.2.3