Skip to content

Commit

Permalink
Show 'Empty response' for 204 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed May 16, 2020
1 parent 72c54dc commit f63536c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/views/partials/endpoint.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
@if(is_object($response['content']) || is_array($response['content']))
{!! json_encode($response['content'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) !!}
@elseif(\Illuminate\Support\Str::startsWith($response['content'], "<<binary>>"))
Binary data - {{ str_replace("<<binary>>","",$response['content']) }}
<Binary data> - {{ str_replace("<<binary>>","",$response['content']) }}
@elseif($response['status'] == 204)
<Empty response>
@else
{!! json_encode(json_decode($response['content']), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) !!}
@endif
Expand Down

0 comments on commit f63536c

Please sign in to comment.