Closed dougsillars closed 3 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);
@dougsillars Have you got a test case I can use for this?
I'll share a sheet with you. I was testing a lot of custom metrics.
Thanks @dougsillars, fixed via #31
LMK if you see any issues with it
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;
TO: var wptAPI = server + "/runtest.php?" //+ querystring; var options = { 'method' : 'post', 'payload' : querystring };