WebPagetest Forums
perform a request from a script - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: perform a request from a script (/showthread.php?tid=15982)



perform a request from a script - anialonsegal - 02-19-2020 12:13 AM

I'm using the RESTful API and I want to make an API call in order to authenticate before running my test, is it possible to execute that request using the script param? or do I have to navigate to a login screen?


RE: perform a request from a script - pmeenan - 02-21-2020 12:31 AM

You need to be on a page of some sort in the browser to initiate the API call. You don't necessarily have to navigate the login screen but you have to navigate to some page (probably on the same origin) then you can use the exec command to run javascript to make the API call.


RE: perform a request from a script - anialonsegal - 03-01-2020 11:23 PM

Thanks, I'll use that