Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add minor network calls for fetch POST/GET to walk around CORs in WKW… #158

Merged
merged 2 commits into from
Feb 8, 2018

Conversation

dmikey
Copy link
Collaborator

@dmikey dmikey commented Feb 8, 2018

tests to follow

added a mode 'bypass'. The fetch will be intercepted.

Current notes, the filled fetch is not compatible with the full API, Request or Header objects. Please use object literals for now.

const authCredentials = {
  'Accept': 'application/json',
  'Content-Type' : 'application/json',
  'x-paypal-internal-euat' : 'access_token',
  'paypal-client-context' : 'ec_token'
};


fetch('http://httpbin.org/post', {
  method: 'POST',
  mode:'bypass',
  body: JSON.stringify({ query: 'true' }),
  headers: new Headers(authCredentials)
}).then(response => {
  console.log(response.json())
});

screen shot 2018-02-07 at 11 09 11 pm

@dmikey dmikey merged commit 77c3f54 into master Feb 8, 2018
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 45.227% when pulling a48a4e6 on skeleton-network-calls into 045a238 on master.

@dmikey dmikey deleted the skeleton-network-calls branch February 8, 2018 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants