javascript - Protractor: Posting api to backend -


i'm new protractor , found there not documentation on post method sending json data backend.

what proper way send json data backend.

i tried using way:

http://www.google.com/url?q=http%3a%2f%2fstackoverflow.com%2fa%2f21804302%2f265261&sa=d&sntz=1&usg=afqjcnh4nnq1htz8p79ezsic0ksymvlfua  

but not succeed not execute block inside browser.executeasyncscript

please post examples or documentation can this

thanks in advance

here's example:

browser.controlflow().execute(function() {     return new promise(function(fulfill, reject) {         var requestbuilder = require('superagent');         var requesturl = 'http://www.google.com/url?q=http%3a%2f%2fstackoverflow.com%2fa%2f21804302%2f265261&sa=d&sntz=1&usg=afqjcnh4nnq1htz8p79ezsic0ksymvlfua';          requestbuilder             .get(requesturl)             .end(function(err, result) {                 if (err) {                     reject(err);                 } else {                     fulfill(result);                 }             });     }); }); 

Comments