supersamples
supersamples copied to clipboard
curl output not following type("form")
post requests in form type got a json string curl payload output
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"
Thanks, I wasn't aware of type('form')
. Does this set a content-type: application/x-www-form-urlencoded
header?
yes it is the http header part is correct