Download the PHP package darkphp/monster without Composer
On this page you can find all versions of the php package darkphp/monster. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download darkphp/monster
More information about darkphp/monster
Files in darkphp/monster
Package monster
Short Description A simple PHP class for making HTTP requests using cURL
License MIT
Informations about the package monster
HTTPMonster
HTTPMonster is a PHP class that provides a simple and easy-to-use interface for making HTTP requests using cURL. It allows you to easily set HTTP headers, request body, request method, and other options.
Installation
You can install HTTPMonster using Composer:
Usage
To use HTTPMonster, you first need to create an instance of the class:
Setting Request Options
HTTPMonster provides several methods for setting request options:
Sending the Request
To send the request, simply call the Send()
method:
The Send()
method returns the response from the server as a string.
Getting the HTTP Status Code
You can get the HTTP status code of the response using the getStatus()
method:
Add 1 Option
HTTPMonster add cURL options for the request. You can modify these defaults by calling the Option()
method:
Chaining Methods
HTTPMonster allows you to chain methods to make the code more readable:
Error Handling
HTTPMonster throws an exception if cURL encounters an error while executing the request. You should always catch these exceptions to handle errors properly:
License
HTTPMonster is licensed under the MIT License. See LICENSE
for more information.
Developer
HTTPMonster is developed by Hossein Pira.
- Email: [email protected]
- Telegram: @h3dev
If you have any questions, comments, or feedback, please feel free to contact John via email or Telegram.