Merge: curl: fix concurrent requests and intro shortcut services for scripts
authorJean Privat <jean@pryen.org>
Thu, 21 Feb 2019 23:38:01 +0000 (18:38 -0500)
committerJean Privat <jean@pryen.org>
Thu, 21 Feb 2019 23:38:01 +0000 (18:38 -0500)
commit82dd64cfe5734d6e193ae6feb179bee04e5a768a
tree304ab0210b30f95381227e6234676f8efb878d4a
parent8989d627b35f762f8332a1ede1dde090213d200a
parentc0d905a456f26aafe935d6041179548beff711aa
Merge: curl: fix concurrent requests and intro shortcut services for scripts

This PR brings 2 main changes:

* The handle to a Curl request is now kept by the `CurlRequest` instances, instead of being shared by all requests. This makes it possible to execute concurrent HTTP requests.

* Intro two new services on `Text` to execute simple HTTP requests. While these new services are useful to simple scripts, if more control is needed you should still use `CurlHTTPRequest`.

  `Text::http_get` makes a GET request and returns the response body.

  `Text::http_download` makes a GET request and saves the response body to a file.

Pull-Request: #2731
Reviewed-by: Jean Privat <jean@pryen.org>