Future Zttp Pack with Laravel 7

The guzzle package made by Zttp Adam Wathan will come to laravel 7 as the new HTTP package. To add this feature, you only need to post some JSON's according to the pull request.

Some of the main uses of the new Http package are :

use Illuminate\Support\Facades\Http;$response = Http::p ost('url', [
'name' => 'Taylor',
]);
echo $response['foo'];$response->body()
$response->json()
$response->status()
$response->ok()
$response->successful() (>= 200 &&; < 300)
$response->serverError()
$response->clientError()

It is worth noting that Guzzle has only one layer of UX/DX convenience on top. If you add a lot of features and need more, use Guzzle directly.

For more information about this new HTTP packet, see the pull request.

  Quote

KARABAY A, 2020 . Future Zttp Pack with Laravel 7,

https://www.karabayyazilim.com/blog/php/framework/laravel/laravel-7-ile-gelecek-zttp-paketi-2020-03-02-212208

(Accessed March 02, 2020).


  Share this post

Comments (0)

Comment

Subscribe
Sign up for the email newsletter to be the first to know about my blog posts