catchpoint / WebPageTest.bulk-tester

Google App Script for spreadsheet that uses the WPT API to bulk test URLs
MIT License
259 stars 22 forks source link

Issue with long urls #25

Closed dougsillars closed 3 years ago

dougsillars commented 4 years ago

With long urls (and, well, a lot of custom metrics), I hit the 2K limit for GET requests. Here's how I made it a POST to get around that limitation:

changing lines 117-124 of the script from: // build API URL and submit tests var wptAPI = server + "/runtest.php?" + querystring;

  var response = UrlFetchApp.fetch(wptAPI);

TO: var wptAPI = server + "/runtest.php?" //+ querystring; var options = { 'method' : 'post', 'payload' : querystring };

  var response = UrlFetchApp.fetch(wptAPI, options);
andydavies commented 3 years ago

@dougsillars Have you got a test case I can use for this?

dougsillars commented 3 years ago

I'll share a sheet with you. I was testing a lot of custom metrics.

andydavies commented 3 years ago

Thanks @dougsillars, fixed via #31

LMK if you see any issues with it