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

Update @wordpress/api-fetch README.md #9738

Merged
merged 1 commit into from Sep 25, 2018

Conversation

Projects
None yet
3 participants
@jhalvorson
Contributor

jhalvorson commented Sep 10, 2018

Description

This is a minor change, something that I just encountered when copying and pasting lines 20-22.

Without prefixing the path with /wp-json/ the following error is returned:

code: "invalid_json"
message: "The response is not a valid JSON response."

Prefixing with /wp-json/ made a successful call and returned the expected data (posts array).

How has this been tested?

I have tested this locally.

Screenshots

Types of changes

Documentation update.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
Update README.md
This is a minor change, something that I just encountered when copying and pasting lines 20-22. 

Without prefixing the path with `/wp-json/` the following error is returned:

```
code: "invalid_json"
message: "The response is not a valid JSON response."
```

Prefixing with `/wp-json/` made a successful call and returned the expected data (posts array).

@Soean Soean added the Documentation label Sep 10, 2018

@gziolo

gziolo approved these changes Sep 25, 2018

Correct, thanks for one 👍

@gziolo gziolo added this to the 4.0 milestone Sep 25, 2018

@gziolo gziolo changed the title from Update README.md to Update @wordpress/api-fetch README.md Sep 25, 2018

@gziolo gziolo merged commit 27e6f1e into WordPress:master Sep 25, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment