-
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
Send JSON or raw body #166
Comments
can you be more clear? i didn understood. What you would like to test? |
http request as below, POST /111/rest/1/platform/1/sync HTTP/1.1 { "params": I would like to post it to the url Thank you for the help |
I wrote something like this , but it didnt work var frisby = require('frisby'); |
you should do something like this: (if not work what is the error?) var requestData = {
"params": {
"params1": 1414576832033,
"params2": 1414576832033
}
};
frisby.create('Should TestPostSyncAndroid')
.post(http://192.168.20.100:80/111/rest/1/platform/1/sync,
requestData,
{ json: true },
{ headers: { 'Content-Type': 'application/json', 'Authorization': <user user authorization> }})
.expectStatus(200)
.expectJSONTypes({})
.expectJSON({})
.toss(); |
Thank you so much for the help , but the problem right now , it shows the status 302 instead of 200 |
This is my code, it for sure something I did wrong var frisby = require('frisby');
|
did you try send this request for example in the Postman app ? 302 is a response for found. Try to add the .inspectJSON() |
Hi , |
try to use the .auth together check how postman set the content-type. check if is in Raw or in x-www-form-urlencoded or something like that, then you will need change |
Thank you so much for the advice, I will try it on Monday when I am in the office , I will keep you update |
Hi, var frisby = require('frisby'); |
your request was accepted. maybe yo uneed talk with some developer whihc made the endpoint and check with him. |
Thank you for the information |
This should be fixed in v0.8.5. Please update to v2 though and see if you still have this issue. |
I'm trying to test a POST where the body type as follow:
{ "params":
{ "params1": 1,
"params2": 2}}
Can you give me any idea how to test it? thank you
The text was updated successfully, but these errors were encountered: