curl-to-go
curl-to-go copied to clipboard
Convert curl commands to Go code in your browser
**Are you requesting support for a new curl flag? If so, what is the flag and the equivalent Go code?** ```bash curl -G https://curl-to-go.com \ -d "id=8a829417567d952801568d9d9e3c0b84" \ -H "Authorization:...
I think it is better to add in the generated sample code a check (even if commented) for HTTP status code (just as a hint). example: ```golang if resp.StatusCode !=...
This PR adds all of curl's arguments as they appear in curl's source code right now, as well as allowing shortening of arguments like curl does, so for example you...
**Are you requesting support for a new curl flag? If so, what is the flag and the equivalent Go code?** ```bash curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \...
Hi, for issue #45 I passed the local test
That would be fairly awesome!
**Are you requesting support for a new curl flag? If so, what is the flag and the equivalent Go code?** ```bash # (curl –X POST https://ssomesite.com/convert \ -F “media[file_data]=@/tmp/Example.wav;type=audio/x-wav” \...
**Are you requesting support for a new curl flag? If so, what is the flag and the equivalent Go code?** ```bash # curl -v -u admin:admin123 -X POST 'http://localhost:8081/service/rest/v1/components?repository=maven-releases' -F...
```bash curl --socks5 127.0.0.1:1080 http://xyz.com ``` ```go proxyUrl, err := url.Parse("socks5://127.0.0.1:1080") httpClient := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)}} u := "http://xyz.com" req, err := http.NewRequest("GET", u, nil) if err != nil {...
Consider the following example: ``` curl -H "X-Access-Key: dgfh464f45v66773454vv666" https://domain.com --resolve 4e45-9996-65d7f49e46f2.another-domain.com:12345:145.23.143.248 ```