Laravel Advanced - HTTP Client (Pool, Retry, Timeout, Basic Auth, Token Auth, etc.)

  Рет қаралды 15,298

Laratips

Laratips

Күн бұрын

In this video, I have explained every aspect of the Laravel HTTP client that comes by default on Laravel. You can send HTTP requests using this HTTP Client.
=== Important Links ===
Fonts, extensions I use, and Support Laratips links:
bit.ly/m/laratips
=== Offer ===
Laravel Hosting: platform.cloudways.com/signup...
Get up to Free Hosting by using code "LARATIPS" and you get $15 as credit which can last almost a month.
Cloudways offers peace of mind and flexibility so you can focus on growing your business and reaching new milestones instead of dealing with server management. With Cloudways, you get an optimized stack, managed servers, backups, staging environment, integrated Git, pre-configured, Composer, 24/7 support, and the choice of five cloud providers: AWS, DigitalOcean, Linode, Google Cloud, and Vultr
====================== Support ======================
If you want me to continue making this kind of video for free on KZbin, then you can support the channel
eSewa ID: 9843632084
Wise Link: bit.ly/3dnBRmX
Wise email: ashish.dhamala2015@gmail.com
===
00:00 Intro to Laravel HTTP Client
00:40 Start testing different API endpoints
00:58 Testing 200 status code API endpoint
03:47 Testing 201 status code API endpoint
04:31 Testing 401 status code API endpoint
05:06 Testing 500 status code API endpoint
05:22 Passing Headers In Laravel HTTP Client
06:27 Debugging with HTTP Client
07:06 Passing parameters to the API endpoint
07:29 Directly accessing the response as an array
08:06 Throwing exception on error
09:33 Retry
11:05 Timeout
12:29 Concurrent requests or Pool
14:05 Testing speed of Concurrent requests with Normal HTTP Requests
16:01 Accessing API with Basic Auth
17:30 Accessing API with Token Auth
18:45 Accept Json Header shortcut implementation
Social Media Links:
Let's be friends
/ aashish_dhamala
Follow On Facebook
/ laratipsofficial
Follow On Twitter
/ laratips1
The website with public API endpoints:
httpbin.org/
Tech stack:
Laravel
PHP
#laravel #php #laraveltip #laratips

Пікірлер: 34
@sujanpoudel6065
@sujanpoudel6065 3 жыл бұрын
Great Content To See And Try Sir.!!
@pankajbokdia
@pankajbokdia 2 жыл бұрын
Amazing video! Keep it up!
@boutlife888
@boutlife888 Жыл бұрын
Very good tutorial. Thank you!
@Laratips
@Laratips Жыл бұрын
You are welcome
@deveshmaurya9101
@deveshmaurya9101 2 жыл бұрын
Thanks for making such video
@Laratips
@Laratips 2 жыл бұрын
You are most welcome
@DevAmirull
@DevAmirull Жыл бұрын
awesome
@jameshello38
@jameshello38 3 жыл бұрын
Thanks man you are so good at laravel 😂. Your channel is like garib haru ko laracasts, in a good way.
@Laratips
@Laratips 3 жыл бұрын
Haha. Ma ni garub nai 6u 😂. Tei vayera yo channel start gareko ho.
@igorstephanoespin6652
@igorstephanoespin6652 2 жыл бұрын
Is it possible to use pool with retry?
@Amityadav-ri2he
@Amityadav-ri2he 2 жыл бұрын
Hi can you tell us how to pass dynamic multiple request in pool
@Andu1991
@Andu1991 3 жыл бұрын
hmm, is there any way to use a retry decider middleware like in guzzle? you should make a tutorial on this.
@melihbagceli1640
@melihbagceli1640 3 жыл бұрын
Thanks, keep it up! I know you have query optimization videos on your channel but more video about it will be much appreciated. Thank you.
@roshanpandey7898
@roshanpandey7898 Жыл бұрын
Brother what is the best way to store endpoint BASE_URL and how can I fetch that in the controller ?
@Laratips
@Laratips Жыл бұрын
laravel.com/docs/9.x/http-client#macros
@vishvish24
@vishvish24 Жыл бұрын
Have to send http request to 3 end point concurrently every 2 second, how to do.
@Laratips
@Laratips Жыл бұрын
laravel.com/docs/9.x/http-client#concurrent-requests
2 жыл бұрын
May I know what font are you using on vscode? Awesome tutorial by the way, thank you!
@Laratips
@Laratips 2 жыл бұрын
It's Jetbrains Mono
@jigyanssingh8677
@jigyanssingh8677 Жыл бұрын
Do the concurrent request works only for Get methods or Post methods too ??
@Laratips
@Laratips Жыл бұрын
It should also work for post request. I haven't tried that though.
@jigyanssingh8677
@jigyanssingh8677 Жыл бұрын
@@Laratips Umm ok but do you have any example or reference to it using post request ??
@Laratips
@Laratips Жыл бұрын
No, you can create a simple post request and try it. It will be easier to know ehat happens I think.
@jigyanssingh8677
@jigyanssingh8677 Жыл бұрын
@@Laratips Ok Thank You :)
@raindeveloper7341
@raindeveloper7341 2 жыл бұрын
I Pass some data in header but got error 404 Can you help me out of this
@Laratips
@Laratips 2 жыл бұрын
Can you plz share the code so that I could see what's happening?
@bashardlaleh2110
@bashardlaleh2110 3 жыл бұрын
it's weird that the json() method converts the response to a php associative array instead of returning json , thanks for the good content
@Laratips
@Laratips 3 жыл бұрын
Yep. toArray would be good here.
@JACKoPL
@JACKoPL 3 жыл бұрын
Maybe next time... Scrape html-dom... and/or js site too.
@Laratips
@Laratips 3 жыл бұрын
Humm. Nice video idea. Thanks
Laravel Advanced - Task Scheduling - CRON Job
16:26
Laratips
Рет қаралды 61 М.
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
00:24
JULI_PROETO
Рет қаралды 17 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 45 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 10 МЛН
Laravel API | All about HTTP client
20:06
Laravel boy
Рет қаралды 3,3 М.
Laravel SPA Authentication - setup and common mistakes
16:55
Tell Me About Yourself | Best Answer (from former CEO)
5:15
The Companies Expert
Рет қаралды 6 МЛН
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 262 М.
5 Dangerous Things to Avoid Saying In a Job Interview
12:57
Don Georgevich
Рет қаралды 7 МЛН
Get Data From Multiple Databases In One Project | Laravel Tip
11:52
Saloon - A PHP package to simplify API integrations
28:09
Andrew Schmelyun
Рет қаралды 9 М.