I am trying to see a response to my url in Firefox JSON viewer, but it is always shown as a plain text. I have option devtools.jsonview.enabled
set to true
. I send a request with a header Accept: application/json
and get the response with the 'correct' content-type: application/json
. Unfortunately, it does't work with my url.
However, Firefox JSON viewer works pretty well with another url. What is it wrong with this one?
After some investigations following your example link, and as you said, the json is valid and well formated.
But the server does not send the application/json
header correctly.
If you can't modify the server, you can still proxy it with the correct header from another server, like this:
Example in php:
<?php
header('Content-Type: application/json');
$data = file_get_contents("https://auction-sandbox.ea.openprocurement.org/database/11111111111111111111111111110149");
echo $data;
Output: