Skip to content

DevPost

Helper for developer

  • Linux Commands
  • Laravel
  • Homestead
  • WordPress
  • Webmin
Posted on February 29, 2020February 29, 2020 by admin

guzzlehttp – http client

1. composer require guzzlehttp/guzzle
2. $client = new \GuzzleHttp\Client();
3. $res = $client->request('GET', 'https://api.exchangeratesapi.io/latest');

echo $res->getStatusCode();
echo $res->getHeader('content-type')[0];
dd( json_decode($res->getBody()) );

http://docs.guzzlephp.org/en/stable/
CategoriesLaravel

Post navigation

Previous PostPrevious @username
Next PostNext add domain to zoho

Categories

  • Amazon (1)
  • Android (2)
  • Apache (10)
  • Cloudflare (1)
  • Composer (3)
  • CSS (4)
  • Design patterns (1)
  • DNS (1)
  • Docker (3)
  • Facebook (2)
  • Firebase (1)
  • Git Commands (9)
  • Google (1)
  • Homestead (6)
  • Laravel (19)
  • Linux Commands (46)
  • MySQL (10)
  • Nginx (5)
  • Node (3)
  • Nuxt (8)
  • Opencart (1)
  • PhP (11)
  • PhpMyAdmin (5)
  • Postman (1)
  • Prestashop (6)
  • SSL (6)
  • Trial (1)
  • UFW (1)
  • Vagrant (4)
  • Vite (1)
  • VueJS (7)
  • Webmin (1)
  • Windows (5)
  • Wordpress (5)
  • Zoho (1)
@All rights reserved to DarFio