Closed ahuigo closed 4 months ago
Example: https://github.com/ahuigo/resty/blob/examples-v2/examples/debug_curl_test.go
var curlCmdExecuted string client := resty.New() _, err := client.R(). SetResultCurlCmd(&curlCmdExecuted). Get("https://httpbin.org/get") // Explore curl command fmt.Println("Curl Command:", curlCmdExecuted)
Test these examples: https://github.com/ahuigo/resty/blob/examples-v2/examples
$ go test -failfast ./examples ok github.com/go-resty/resty/v2/examples (cached)
@ahuigo, I'm putting my effort into v3. I will return to this PR after the v3 work is in good shape. Thanks.
New feature: generate curl command
Example: https://github.com/ahuigo/resty/blob/examples-v2/examples/debug_curl_test.go
Some examples
Test these examples: https://github.com/ahuigo/resty/blob/examples-v2/examples