How to fetch a WordPress admin page using google apps script?

Posted by Rohit Kumar | Updated on

If you want to fetch a WordPress admin page using google apps script? There might be an issue with Google Apps Scripts and post-ing to a URL that gives you back a redirection header.

It seems like it might not be possible to follow the redirect with a post – here’s a discussion on the issue – https://code.google.com/p/google-apps-script-issues/issues/detail?id=1254#c3

Would it be possible, if you modify your code to not follow redirects, capture the cookies and then do a second request to your page? I haven’t actually used GAS, but here’s my best guess from reading the documentation:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers