Reputation: 134
I'm following this official guide.
The purpose of this is, after login I want to do an API request to get the magic link to finish signing UP. I used to do this in cypress just adding a url, the methods and the headers. I'm trying to understand how to do it with testcafe.
The code just after filling up the login form and clicking signup is:
await t.request({
url: 'https://mailsac.com/api/addresses/[email protected]/messages',
headers: {
"Mailsac-Key": "key-goes-here",
},
});
But for some reason when it gets here I get the following:
- TypeError: Cannot read property 'proxy' of null
Although I'm not sure how to actually use .request() properly, this could also have to do with the fact that I'm using the proxyless mode due to previous issues with my website.
Which is it? Is there a way around it? Also, how do you handle the response of the request? I haven't seen any code samples.
Upvotes: 0
Views: 130