I am completely new to using protractor/cucumber and restler in Typescript. The code below is what I have so far for hitting an endpoint URL and getting 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);
});
The above code prints the following:
In method:endpoint URL
undefined
I would like to print both the response and the response code.