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

Xhr#fetchJson now returns Response #9574

Merged
merged 14 commits into from Jun 6, 2017

Conversation

jridgewell
Copy link
Contributor

Partial for #9448.

});
return xhr.fetchJson('http://localhost:31862/get?k=v1')
.then(res => res.json())
.then(res => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: consider renaming this arg since it isn't a response, it's the result of the json() call

json() {
return Promise.resolve({different});
},
});.once();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks unintentional

json() {
return Promise.resolve({});
},
});.once();
Copy link
Contributor

@cvializ cvializ May 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto (This looks unintentional)

@@ -79,6 +79,7 @@ export class AmpAutoAds extends AMP.BaseElement {
};
return xhrFor(this.win)
.fetchJson(configUrl, xhrInit)
.then(res => res.json());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional semicolon?

@jridgewell jridgewell force-pushed the xhr-fetchJson-response branch 2 times, most recently from 7841492 to e0da2de Compare May 31, 2017 23:08
@jridgewell jridgewell force-pushed the xhr-fetchJson-response branch 2 times, most recently from 26eb0b4 to 7fc7e42 Compare June 2, 2017 22:14
@jridgewell
Copy link
Contributor Author

Ping @cvializ.

@jridgewell jridgewell merged commit 4b22b88 into ampproject:master Jun 6, 2017
@jridgewell jridgewell deleted the xhr-fetchJson-response branch June 6, 2017 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants