FetchError
invalid json response body at https://api.uraldrama.ru/wp-json/ural-drama/v1/news/id137 reason: Unexpected token < in JSON at position 0
node_modules/node-fetch/lib/index.js:273:32
return consumeBody.call(this).then(function (buffer) {
try {
return JSON.parse(buffer.toString());
} catch (err) {
return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
}
});
},
/**
internal/process/task_queues.js:95:5
processTicksAndRejections
pages/news/_slug.vue:134:
async asyncData
async asyncData({route, params}) {
if (process.server) {
const response = await fetch("https://api.uraldrama.ru/wp-json/ural-drama/v1/news/"+route.params.slug);
//use route object
const news = await response.json();
return {news}
//directly use params
//console.log("params",params.slug)
}
Request Details
URI |
/news/id137 |
Request Method |
GET |
HTTP Version |
1.1 |
Connection |
Keep-Alive |
Headers
HOST |
uraldrama.ru |
X-REAL-IP |
3.234.246.109 |
X-FORWARDED-FOR |
3.234.246.109, 3.234.246.109 |
X-FORWARDED-PORT |
443 |
X-FORWARDED-PROTO |
https |
ACCEPT |
*/* |
USER-AGENT |
claudebot |
REFERER |
http://uraldrama.ru/news/id137 |
X-FORWARDED-HOST |
uraldrama.ru |
X-FORWARDED-SERVER |
uraldrama.ru |
Cookies