Download the PHP package ahmard/guzwrap without Composer
On this page you can find all versions of the php package ahmard/guzwrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package guzwrap
Guzwrap
Guzwrap is an object-oriented wrapper around GuzzleHttp.
This project is founded to make sending request with Guzzle easier and enjoyable.
Supported PHP Versions
Guzwrap require PHP >= 7.4 or >= 8.0.
Installation
Make sure you have Composer installed.
Usage
-
get Guzwrap Instance
-
Request with cookies
-
Handle redirects
-
Headers
-
Query
- Post form data
You can use RequestInterface::form() method
Note: If you did not set form method to post, all your input fields will be treated as url queries.
More Request usage
-
Use request data
- Use request object
Asynchronous Operations
-
Running multiple requests at once
-
Create PHP Built-in Server
-
Create an index.php file and put below code into it
-
Crate test.php and put below code into it
- Now run the test.php file
-
-
Using Concurrent class to manage Guzzle Request Concurrency
- Using request pool
UserAgent
We provide custom user agents to help send request easily.
-
List user agents
-
Get random user agent
-
Add user agents to the collection.
Please take a look at user agent definition sample - Use raw user agent
Note that you can only pass Guzwrap\UserAgent class to the request object, nothing more.
This may open door to other possibilities in the future.
Stack
Manipulating Guzzle StackHandler
Middleware
Adding middleware to GuzzleHttp requests
Extending Guzwrap
Testing
Rust PHP built-in server before running the test
Run the test
Enjoy 😎