@if(count($response->headers))
Headers
@php
$headerLines = [];
foreach($response->headers as $header => $value) {
$headerLines[] = $header . ': ' . (is_array($value) ? implode('; ', $value) : $value);
}
@endphp
{{ implode("\n", $headerLines) }}
@endif
@if($response->isBinary())
[{{ u::trans("scribe::endpoint.responses.binary") }}] - {{ htmlentities(str_replace("<>", "", $response->content)) }}
@elseif($response->status == 204)
[{{ u::trans("scribe::endpoint.responses.empty") }}]
@else
@php($parsed = json_decode($response->content))
{{-- If response is a JSON string, prettify it. Otherwise, just print it --}}
{!! htmlentities($parsed != null ? json_encode($parsed, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) : $response->content) !!}
@endif