Skip to content

Instantly share code, notes, and snippets.

@jonchenn
Last active March 27, 2019 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonchenn/172db1e297c1c7153906910af8a72681 to your computer and use it in GitHub Desktop.
Save jonchenn/172db1e297c1c7153906910af8a72681 to your computer and use it in GitHub Desktop.
fetch(url, {
method: 'POST',
headers: {
'AMP-Same-Origin': 'true',
'Accept': 'application/json',
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryzCA5AbNQoBPgNVsS',
'Origin': 'http://qa.bosley.com',
'Referer': 'http://qa.bosley.com/lpamp/gbh1/?amp',
'User-Agent': 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Mobile Safari/537.36}',
},
method: "POST", // *GET, POST, PUT, DELETE, etc.
mode: "cors", // no-cors, cors, *same-origin
cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
credentials: "same-origin", // include, *same-origin, omit
redirect: "follow", // manual, *follow, error
referrer: "no-referrer", // no-referrer, *client
body: '',
}).then(x => console.log(x));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment