@if(isset($descriptionComment)) {{-- Expecting array of string parts where line breaks are the separation criteria. --}} /** @foreach($descriptionComment as $line) * {{ $line }} @endforeach */ /** * */ @endif fetch("{{ $requestURL }}", { "method": "{{ $function->httpMethod ?? 'GET' }}", "mode": "cors", "headers": { "client-token": "api-mfr-0123456789abcdef0123456789ABCDEF", @if(isset($userToken)) "user-token": "{{ $userToken }}", @endif "content-type": "{{ $contentType ?? 'Application/JSON' }}", }, "body": @if(isset($requestJSONBody)){{ json_decode(json_encode($requestJSONBody)) }} @else { // This server request does not require body parameters. } @endif }).then((response) => { response.JSON() }) .then((data) => { //... });