Installation
The Instructor HTTP client API is part of the Instructor library (https://instructorphp.com) and is bundled with it. You can install it separately via Composer:Dependencies
The Instructor HTTP client API requires at least one of the supported HTTP client libraries. Depending on which client you want to use, you’ll need to install the corresponding package: For Guzzle:PHP Requirements
The library requires:- PHP 8.1 or higher
- JSON extension
- cURL extension (recommended)
Basic Usage
Using the Instructor HTTP client API involves a few key steps:- Create an
HttpClient
instance - Create an
HttpRequest
object - Use the client to handle the request
- Process the response