Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jaredlockhart/e0beba06a79940ea74a908d6d7b66754 to your computer and use it in GitHub Desktop.
Save jaredlockhart/e0beba06a79940ea74a908d6d7b66754 to your computer and use it in GitHub Desktop.
> fetch("http://metadata.dev.mozaws.net/", {
... method: "POST",
... mode: "no-cors",
... headers: {"content-type": "application/json"},
... body: data}).then((r) => r.json()).then(console.log)
Promise { <pending> }
> { error: '',
urls:
{ 'http://cs.ubc.ca':
{ description: 'UBC Computer Science is one of the top computer science departments in Canada, known for excellence in both research and teaching.',
icon_url: 'https://www.cs.ubc.ca/sites/default/themes/ubccs/favicon.ico',
image_url: 'https://www.cs.ubc.ca/sites/default/themes/ubccs/_img/_search/topper-search-right-round.gif',
title: 'Computer Science at UBC',
url: 'http://cs.ubc.ca',
original_url: 'http://cs.ubc.ca',
provider_url: 'http://cs.ubc.ca',
favicon_url: 'http://cs.ubc.ca/favicon.ico' } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment