README
¶
Curl HTTP Transport for Go's http.Client
Implements an http.RoundTripper for Go's http.Client that uses your local curl binary to execute the request.
Usage
rt := curl.Transport{}
hc := http.Client{Transport: &rt}
rs, _ := hc.Get("https://en.wikipedia.org/")
Why!?
Mostly to see if it could be done. No real reason beyond that.
Expectation Management
This is an experiment. No API stability guarantees are made and the code is not guaranteed to work.
I recommend you copy-paste pieces you want to use as-needed into the
internal/
folder of your projects rather than reference these modules
directly as I may change the APIs in here without warning at any time.
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPVersion ¶
type HTTPVersion string
const ( HTTP10 HTTPVersion = "--http1.0" HTTP11 HTTPVersion = "--http1.1" HTTP2 HTTPVersion = "--http2" HTTP2PriorKnowledge HTTPVersion = "--http2-prior-knowledge" HTTP3 HTTPVersion = "--http3" )
Click to show internal directories.
Click to hide internal directories.