From d9f2ed0abc9962d511ab74af1a673da3170e597e Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 16 Aug 2012 14:45:51 -0600 Subject: [PATCH] adding an optional argument to get-pure-port/headers original commit: a1e855a0358c5995eac7a9e6dd33eaedf66da92d --- collects/net/scribblings/url.scrbl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/collects/net/scribblings/url.scrbl b/collects/net/scribblings/url.scrbl index 4c7297efbf..26c9322858 100644 --- a/collects/net/scribblings/url.scrbl +++ b/collects/net/scribblings/url.scrbl @@ -316,14 +316,17 @@ empty string, or it will be a string matching the following regexp: @defproc[(get-pure-port/headers [url url?] [headers (listof string?) '()] - [#:redirections redirections exact-nonnegative-integer? 0]) + [#:redirections redirections exact-nonnegative-integer? 0] + [#:status? status? boolean? #f]) (values input-port? string?)]{ This function is an alternative to calling @racket[get-impure-port] and @racket[purify-port] when needing to follow redirections. That is, it does a GET request on @racket[url], follows up to @racket[redirections] redirections and returns a port containing - the data as well as the headers for the final connection. + the data as well as the headers for the final connection. If + @racket[status?] is true, then the status line is included in the + result string. } @defproc*[([(call/input-url [URL url?]