-
-
Save ii0/1b280099ccf17c297e2b025184c2a73c to your computer and use it in GitHub Desktop.
PhantomJS Custom Headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(); | |
// User-Agent is supported through page.settings | |
page.settings.userAgent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25'; | |
// This is how you set other header variables | |
page.customHeaders = {'Referer': 'localhost'}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment