Skip to content
New issue

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

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

Already on GitHub? # to your account

--data-urlencode flag does not work #55

Open
KaymeKaydex opened this issue Oct 11, 2022 · 0 comments
Open

--data-urlencode flag does not work #55

KaymeKaydex opened this issue Oct 11, 2022 · 0 comments

Comments

@KaymeKaydex
Copy link

KaymeKaydex commented Oct 11, 2022

curl --location --request POST 'https://test.test/pest' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0' \
--data-urlencode 'test=1' \
--data-urlencode 'lang=ru_RU'```

go generated code : 

```go
req, err := http.NewRequest("POST", "https://test.test/pest", nil)
if err != nil {
	// handle err
}
req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0")

resp, err := http.DefaultClient.Do(req)
if err != nil {
	// handle err
}
defer resp.Body.Close()
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant