Download the PHP package kkedzierski/rest-api-client without Composer
On this page you can find all versions of the php package kkedzierski/rest-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kkedzierski/rest-api-client
More information about kkedzierski/rest-api-client
Files in kkedzierski/rest-api-client
Download kkedzierski/rest-api-client
More information about kkedzierski/rest-api-client
Files in kkedzierski/rest-api-client
Vendor kkedzierski
Package rest-api-client
Short Description Rest Api client library to send HTTP requests and retrive response
License MIT
Package rest-api-client
Short Description Rest Api client library to send HTTP requests and retrive response
License MIT
Please rate this library. Is it a good library?
Informations about the package rest-api-client
Rest Api Client
library to send HTTP requests and retrieve response object
Instalation
To use library in another project write in console:
\
Usage
After instalation composer requirements to use library at the top of file write
And create instance of class with base URI
ex.
To add to header use addToHeader method,method take two parameters Type and Value
ex.
To add additonal parmeters like gets or header create array and add this array as an argument to request methods
ex. array:
To make HTTP Request use methods get, post, put, patch, delete
ex.
To specify endpoint to GET PUT PATCH or DELETE method you can use parametr value argument
ex.
GET method parameters
- string $resource must start with "/" ex. /products or /products/:id
- string|int $parameterValue parametr required if is specific in resource , default = ''
- array|null $additionalField ex. header, default = null
POST method parameters
- string $resource must start with "/" ex. /products or /products/:id
- array $postData data to send
- array|null $additionalField ex. header, default = null
PUT and PATCH methods parameters
- string $resource must start with "/" ex. /products or /products/:id
- string|int $parameterValue parametr required if is specific in resource , default = ''
- array $updateData data to update
- array|null $additionalField ex. header, default = null
DELETE method parameters
- string $resource must start with "/" ex. /products or /products/:id
- string|int $parameterValue parametr required if is specific in resource , default = ''
- array|null $additionalField ex. header, default = null
every methods return response object with methods
- getUrl();
- getStatusCode();
- getHeader();
- getHeaderLine(string);
- getBody();
- getContent();
Rest Api Clinet object have additional methods:
- getUrl();
- getHeader();
- getHeaderLine(string);
Example usage
All versions of rest-api-client with dependencies
PHP Build Version
Package Version
No informations.
The package kkedzierski/rest-api-client contains the following files
Loading the files please wait ....