Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example: add examples about ssl, debug, curl, trace, error, etc && new feature about getting curl command #734

Closed
wants to merge 5 commits into from

Conversation

ahuigo
Copy link

@ahuigo ahuigo commented Oct 16, 2023

New feature: generate curl command

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)

Some examples

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 ahuigo changed the title example: add examples about ssl, debug, curl, trace, error, etc. example: add examples about ssl, debug, curl, trace, error, etc && new feature about getting curl command Oct 16, 2023
@ahuigo ahuigo closed this May 8, 2024
@jeevatkm
Copy link
Member

jeevatkm commented May 9, 2024

@ahuigo, I'm putting my effort into v3. I will return to this PR after the v3 work is in good shape. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants