Last active
August 29, 2015 14:05
-
-
Save thisislawatts/d7ae997f234130d254fc to your computer and use it in GitHub Desktop.
WordPress Public API, Problem where querying via batch consistently returns HTTP error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://public-api.wordpress.com/rest/v1/sites/www.mosaicrooms.org | |
{ | |
"ID": 71655423, | |
"name": "The Mosaic Rooms", | |
"description": "Contemporary Culture from the Arab World", | |
"URL": "http://www.mosaicrooms.org", | |
"jetpack": true, | |
"subscribers_count": 0, | |
"is_private": false, | |
"is_following": false, | |
"meta": { | |
"links": { | |
"self": "https://public-api.wordpress.com/rest/v1/sites/71655423", | |
"help": "https://public-api.wordpress.com/rest/v1/sites/71655423/help", | |
"posts": "https://public-api.wordpress.com/rest/v1/sites/71655423/posts/", | |
"comments": "https://public-api.wordpress.com/rest/v1/sites/71655423/comments/", | |
"xmlrpc": "http://www.mosaicrooms.org/xmlrpc.php" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://public-api.wordpress.com/rest/v1/batch?http_envelope=1&urls%5B%5D=%2Fsites%2Fwww.mosaicrooms.org | |
{ | |
"code": 200, | |
"headers": [ | |
{ | |
"name": "Content-Type", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"/sites/www.mosaicrooms.org": { | |
"status_code": 400, | |
"errors": { | |
"error": "jetpack_error", | |
"message": "The Jetpack site is inaccessible or returned an error: transport error - HTTP status code was not 200 (404) [-32300]" | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET https://public-api.wordpress.com/rest/v1/batch?http_envelope=1&urls%5B%5D=%2Fsites%2Fwww.mosaicrooms.org | |
Accept-Encoding: gzip, deflate | |
Accept: */* | |
Accept-Language: en-us | |
Content-Type: application/json | |
Pragma: no-cache | |
X-hacker: Oh, Awesome: Opossum | |
Content-Encoding: gzip | |
Server: nginx | |
Transfer-Encoding: Identity | |
Expires: Wed, 11 Jan 1984 05:00:00 GMT | |
Cache-Control: no-cache, must-revalidate, max-age=0 | |
Date: Mon, 25 Aug 2014 09:35:44 GMT | |
Connection: keep-alive | |
X-Prefork: 1 | |
Vary: Accept-Encoding | |
{"code":200,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"\/sites\/www.mosaicrooms.org":{"ID":71655423,"name":"The Mosaic Rooms","description":"Contemporary Culture from the Arab World","URL":"http:\/\/www.mosaicrooms.org","jetpack":true,"subscribers_count":0,"is_private":false,"is_following":false,"meta":{"links":{"self":"https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/71655423","help":"https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/71655423\/help","posts":"https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/71655423\/posts\/","comments":"https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/71655423\/comments\/","xmlrpc":"http:\/\/www.mosaicrooms.org\/xmlrpc.php"}}}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment