I am totally new with protractor/cucumber and restler. I am using Typescript. Below is the code that I am using to hit the endpoint url and to get the response
Given('Hit the {string}', async (string) => {
browser.quit()
var data: any = get(string.replace(/\s+/g, ''));
console.log("In method:" + string.replace(/\s+/g, ''));
console.log(data.response);
});
This prints the below:
In method:endpoint URL
undefined
I want the response and the responsecode to be printed.
Thanks for the response. Below code worked