GithubHelp home page GithubHelp logo

gencurl's People

Contributors

trotha01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gencurl's Issues

Can I use --data-urlencode ?

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.

It is not support `--data-raw`

  • input
curl -X POST https://www.google.com --data-raw 'id=ae94cfbb-38b0-4b0c-bcff-2cb866a742fa'
  • expect output:

// 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()
  • current output:

// 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()

Not generating from multipart/form-data curl

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.