Browse Source

Show 'Empty response' for 204 responses

shalvah 5 years ago
parent
commit
f63536c76d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      resources/views/partials/endpoint.blade.php

+ 3 - 1
resources/views/partials/endpoint.blade.php

@@ -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