vendredi 14 octobre 2022

how convert api response to a certain font in laravel 8?

api response which I want to convert

//Fetching news in the API

public function newsFetchApi()
{

    $responseFromApi = Http::withHeaders([
        'X-API-KEY' => 'XXXXXX',

    ])->withBasicAuth(
        'XXXXXX',
        'XXXXXX'

    )->post('https://XXXXXX.in/filesystemapi/api/V1/Filesystemnews/');


    $response =   $responseFromApi['data']['news'];
    return $response;
}

I want to covert the news-title and news-content in a given font by client before it fetching the response

Aucun commentaire:

Enregistrer un commentaire