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

curl output not following type("form") #29

Open
littlexiang opened this issue Nov 5, 2015 · 3 comments
Open

curl output not following type("form") #29

littlexiang opened this issue Nov 5, 2015 · 3 comments

Comments

@littlexiang
Copy link

post requests in form type got a json string curl payload output

@littlexiang
Copy link
Author

utils.api.post('/path/to')
                .type("form")
                .send(utils.data.iOSApp)
                .send({token: new_user_platform.token})
                .send({
                    'email': new_user_email.user.email,
                    'password': utils.DEFAULT_PASSWORD
                })
curl -X POST -H "content-type: application/x-www-form-urlencoded" -H "content-length: 141" -d '{"mobile":"18657072366","password":"password","nickname":"test1-4kg73vV7Gg","verifycode":"1179527","phonecode":"86","countrycode":"CN","v":"i6.5.0","vc":"AppStore","vd":"ABCDEFG"}' "http://10.1.14.251/path/to"

@rprieto
Copy link
Owner

rprieto commented Nov 5, 2015

Thanks, I wasn't aware of type('form'). Does this set a content-type: application/x-www-form-urlencoded header?

@littlexiang
Copy link
Author

yes it is
the http header part is correct

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

No branches or pull requests

2 participants