node-js-libs / curlrequest

A cURL wrapper
MIT License
184 stars 44 forks source link

Failed to initialize #46

Closed MaestroJurko closed 8 years ago

MaestroJurko commented 8 years ago

How would someone set http version to 1.0?

https://curl.haxx.se/docs/manpage.html

-0, --http1.0

(HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred: HTTP 1.1.

--http1.1

(HTTP) Tells curl to use HTTP version 1.1. This is the internal default version. (Added in 7.33.0)

--http2

(HTTP) Tells curl to issue its requests using HTTP 2. This requires that the underlying libcurl was built to support it. (Added in 7.33.0)

--http2-prior-knowledge

(HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight away. HTTPS requests will still do HTTP/2 the standard way with negotiated protocol version in the TLS handshake.

HTTP/2 support in general also requires that the underlying libcurl was built to support it. (Added in 7.49.0)

MaestroJurko commented 8 years ago

I am setting version with 'http1.0': true as one of the options, but then I get error: Failed to initialize.

MaestroJurko commented 8 years ago

Found the issue, there was a space in URL