Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel Http client throw exception if request is not successful

$response = Http::withToken(Auth::user()->magento_access_token)->get('' . Auth::user()->magento_base_url . 'rest/V1/categories/');
        $response->throw();
 
PREVIOUS NEXT
Tagged: #Laravel #Http #client #throw #exception #request #successful
ADD COMMENT
Topic
Name
1+7 =