javascript - protractor: How to send a post api request directly for testing -


im new protractor , have registration page, wanted post api directly user profile directly created

my controller

<script>  var app = angular.module("app", []);  app.controller("httpgetcontroller", function($scope, $http) {  $scope.senddata = function() {      var data = {"firstname":"check","lastname":"raq","roles":["patient"],"contactinfo":{"email":"test1@123.com","primaryphone":"+918598598547","secondaryphone":null}}           $http.post('/serverrequest/postdataresponse', data)         .success(function(data, status, headers) {             $scope.postdataresponse = data;         })         .error(function(data, status, header) {             $scope.responsedetails = "data: " + data +                 "<hr />status: " + status          });     };  }); </script> 

how should write api call test case directly.......

any appreciated.........thanks in advance


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -