-
Notifications
You must be signed in to change notification settings - Fork 202
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
POST JSON with extra (") at start and end #172
Comments
I am facing the same problem. Did you find any solution ? |
The trick on issue #167 fixed it for me. I've seen that reverting 'request' dependency back to 2.49 instead of 2.51 also fixes it, but I didn't try that. |
I have encountered the same problem. Reverting request.js back to 2.49 works for me. |
I didn't revert back to 2.51. I just changed |
Update to Frisby v0.8.5 - this is resolved. |
getting the same issue with "version": "2.0.16" when sending the post request. Request is assigned to a variable and the variable is set in the frisby post command. get the request : var contents = fs.readFileSync(conf.tempFile, 'utf8').split('\n'); send the request : var response = frisby sending request taken from pcap : "{"applicationId":"APP_000409","password":"eca5f1be454dc6744524b89010b40b5b","message":"hello world","destinationAddresses":["tel:AZ1101HXstW4OYuw4QQfODWKWPzL7dqtj49mywemJ6F5Mw+Np3WrFV6euLMjSgGx4hsQX6LQ0irL74IR673S0cNWWJA=="],"deliveryStatusRequest":"0"}" |
I think requestToFire is string. How about this ? .post(conf.url,JSON.parse(requestToFire)) |
yes I got the issue resolved by using the above (Y) |
So, I'm trying to test a POST request like this:
But, instead of a response 200, I'm getting a 401, because JSON isn't parsed correctly. I tried on Postman and it behaves correctly, returning 200, and after printing the body on the server it is like this (just an example, not the full body):
But with frisby it is:
I think the quotation marks at the start and the end of the body are the problem, and server can't parse the JSON correctly. Am I doing something wrong?
The text was updated successfully, but these errors were encountered: