sethgrid / gencurl Goto Github PK
View Code? Open in Web Editor NEWgencurl generates a curl command based on an http.Request to be used for logging and debugging
gencurl generates a curl command based on an http.Request to be used for logging and debugging
As of now, I cannot convert --data-urlencode
. Is this doable? If not, can you pls take it as a feature request? This is my curl command.
$ curl --user 'admin:password' -X POST "https://my-url" -d token=XXXX-XXX \
--data-urlencode json='{"parameter": [{"name":"ACCOUNT", "value":"111111"}]}'
Thanks.
curl -X POST https://www.google.com --data-raw 'id=ae94cfbb-38b0-4b0c-bcff-2cb866a742fa'
// Generated by curl-to-Go: https://mholt.github.io/curl-to-go
resp, err := http.Post("https://www.google.com", "", strings.NewReader("id=ae94cfbb-38b0-4b0c-bcff-2cb866a742fa"))
if err != nil {
// handle err
}
defer resp.Body.Close()
// Generated by curl-to-Go: https://mholt.github.io/curl-to-go
resp, err := http.Post("https://www.google.com", "", nil)
if err != nil {
// handle err
}
defer resp.Body.Close()
I came here to say this. That is all :)
Hi, today I tried testing for multipart/form-data cURL posting, but it didn't convert the form itself
Original curl
curl -X POST \
https://localhost:8000/login \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F button=ok
Converted to Golang
// Generated by curl-to-Go: https://mholt.github.io/curl-to-go
req, err := http.NewRequest("POST", "https://localhost:8000/login", nil)
if err != nil {
// handle err
}
req.Header.Set("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
resp, err := http.DefaultClient.Do(req)
if err != nil {
// handle err
}
defer resp.Body.Close()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.