PHPackages                             kaythinks/eazycurl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kaythinks/eazycurl

ActiveLibrary

kaythinks/eazycurl
==================

This package will make calling API endpoints easier

11181PHPCI failing

Since Dec 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kaythinks/Eazycurl)[ Packagist](https://packagist.org/packages/kaythinks/eazycurl)[ RSS](/packages/kaythinks-eazycurl/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (1)

Kaythinks/EazyCurl
==================

[](#kaythinkseazycurl)

This is a PHP Wrapper which makes making API Calls a breeze

There are presently 6 static methods namely;

- getApiResponse(string $url) : Array -This method returns a JSON Response for unauthenticated API's.
- getWebContents(string $url) : String -This method returns the contents of a web page.
- postApiData(array $data, string $url) : Array -This method can be used to post data to an API endpoint
- postAuthApiData(array $data, string $url, string $token) : Array -This method is for accessing authenticated API endpoints by passing data and token variables
- getAuthApi(string $url, string $token) : Array -This method is for accessing an authenticated GET endpoint
- postAuthApi(string $url, string $token) : Array -This method is for accessing an authenticated POST endpoint

To install this package follow the steps below

\-- Run composer require kaythinks/eazycurl

\-- Run composer dump-autoload

\-- The library can be used this way for example;

```
