-
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
How to pass variable in POST request #143
Comments
var frisby = require('/usr/local/lib/node_modules/frisby/lib/frisby'); // Global setup for all tests /**
var requestData = { this might help u |
Worked, Thank you On Mon, Oct 13, 2014 at 3:16 AM, Moses Gangipogu notifications@github.com
|
great 👍 |
For sake of simplicity, we should create a .postJson(url, data) alias to .post(url, data,
{json: true} ,
{ headers: { 'Content-Type': 'application/json'}}
) |
Hello,
var postJSON = [{'queryString': 'First String'},
{'queryString': 'Second String'}];
for(var i=0; i<postJSON.length; i++) {
var obj = postJSON[i];
frisby.create('Execute Query to verify the Query Results')
.post(serverName + port + runQuery, {
--> How can I pass a variable --> obj.queryString
})
.expectStatus(200)
.expectHeader('Content-Type', 'application/json')
.inspectJSON()
.toss();
}
The text was updated successfully, but these errors were encountered: