Popularity
0.8
Stable
Activity
0.0
Stable
5
2
2

Programming language: PHP
License: MIT License
Tags: HTTP     Requests     Http Client     Client     Guzzle     Request    
Latest version: v1.2.0

JCRequest alternatives and similar libraries

Based on the "HTTP" category.
Alternatively, view JCRequest alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of JCRequest or a related project?

Add another 'HTTP' Library

README

JCRequest

Another Guzzle wrapper

Packagist Packagist Travis Scrutinizer Codecov Packagist FOSSA Status

Installation

$ composer require jaredchu/jc-request

Usage

use JC\HttpClient\JCRequest;

GET

$response = JCRequest::get($url);
echo $response->status();
echo $response->body();
var_dump($response->json());

POST

$response = JCRequest::post($url, $params, $headers);
echo $response->status();
echo $response->body();
var_dump($response->json());

RESTful

$response = JCRequest::post($url, json_encode($params), $headers);
var_dump($response->json());

Basic Auth

$response = JCRequest::get($url, $params, $headers, [
  'auth' => [$userName, $passwd]
]);

Request timeout

$response = JCRequest::get($url, $params, $headers, [
  'connect_timeout' => 2,
  'timeout' => 2
]);

Contributing

  1. Fork it!
  2. Create your feature branch: $ git checkout -b feature/your-new-feature
  3. Commit your changes: $ git commit -am 'Add some feature'
  4. Push to the branch: $ git push origin feature/your-new-feature
  5. Submit a pull request.

License

MIT License

FOSSA Status


*Note that all licence references and agreements mentioned in the JCRequest README section above are relevant to that project's source code only.