adding codeclimate and updating README
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
build
|
||||||
vendor
|
vendor
|
||||||
composer.lock
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -1,7 +1,14 @@
|
|||||||
# Unirest for PHP [](https://travis-ci.org/Mashape/unirest-php)
|
# Unirest for PHP ![GitHub version][github-image] [![version][composer-image]][composer-url]
|
||||||
|
|
||||||
|
[![Build Status][travis-image]][travis-url]
|
||||||
|
[![Code Climate][codeclimate-image]][codeclimate-url]
|
||||||
|
[![Coverage Status][codecoverage-image]][codecoverage-url]
|
||||||
|
[![Dependency Status][dependency-image]][dependency-url]
|
||||||
|
|
||||||
Unirest is a set of lightweight HTTP libraries available in multiple languages, ideal for most applications:
|
Unirest is a set of lightweight HTTP libraries available in multiple languages, ideal for most applications:
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
* Utility methods to call `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH` requests
|
* Utility methods to call `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH` requests
|
||||||
* Supports form parameters, file uploads and custom body entities
|
* Supports form parameters, file uploads and custom body entities
|
||||||
* Supports gzip
|
* Supports gzip
|
||||||
@@ -18,8 +25,9 @@ Created with love by [Mashape](https://www.mashape.com)
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Install with Composer
|
### Install with [Componser](https://getcomposer.org)
|
||||||
If you're using [Composer](https://getcomposer.org/) to manage dependencies, you can add Unirest with it.
|
|
||||||
|
If you're using Composer to manage dependencies, you can add Unirest with it.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
@@ -62,7 +70,7 @@ $response->code; // HTTP Status code
|
|||||||
$response->headers; // Headers
|
$response->headers; // Headers
|
||||||
$response->body; // Parsed body
|
$response->body; // Parsed body
|
||||||
$response->raw_body; // Unparsed body
|
$response->raw_body; // Unparsed body
|
||||||
```
|
```dependency-image
|
||||||
|
|
||||||
### File Uploads
|
### File Uploads
|
||||||
|
|
||||||
@@ -154,3 +162,24 @@ Unirest\Request::verifyPeer(false); // Disables SSL cert validation
|
|||||||
```
|
```
|
||||||
|
|
||||||
By default is `true`.
|
By default is `true`.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Licensed under [the MIT license](LICENSE).
|
||||||
|
|
||||||
|
[github-image]: https://badge.fury.io/gh/mashape%2Funirest-php.svg
|
||||||
|
|
||||||
|
[composer-url]: http://badge.fury.io/ph/mashape%2Funirest-php
|
||||||
|
[composer-image]: https://badge.fury.io/ph/mashape%2Funirest-php.svg
|
||||||
|
|
||||||
|
[travis-url]: https://travis-ci.org/Mashape/unirest-php
|
||||||
|
[travis-image]: https://travis-ci.org/Mashape/unirest-php.png?branch=master
|
||||||
|
|
||||||
|
[codeclimate-url]: https://codeclimate.com/github/Mashape/unirest-php
|
||||||
|
[codeclimate-image]: https://codeclimate.com/github/Mashape/unirest-php/badges/gpa.svg
|
||||||
|
|
||||||
|
[codecoverage-url]: https://codeclimate.com/github/Mashape/unirest-php
|
||||||
|
[codecoverage-image]: https://codeclimate.com/github/Mashape/unirest-php/badges/coverage.svg
|
||||||
|
|
||||||
|
[dependency-url]: https://www.versioneye.com/user/projects/54b702db050646ca5c00019d
|
||||||
|
[dependency-image]: https://www.versioneye.com/user/projects/54b702db050646ca5c00019d/badge.svg?style=flat
|
||||||
|
|||||||
@@ -8,11 +8,13 @@
|
|||||||
"author": "Mashape <opensource@mashape.com> (https://www.mashape.com)",
|
"author": "Mashape <opensource@mashape.com> (https://www.mashape.com)",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.4.0",
|
"php": ">=5.4.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "0.0.0.*",
|
||||||
"ext-json": "*"
|
"ext-json": "~1.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "*"
|
"ext-xdebug": "~2.2",
|
||||||
|
"phpunit/phpunit": "~4.4",
|
||||||
|
"codeclimate/php-test-reporter": "0.1.*"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit bootstrap="tests/bootstrap.php" colors="true">
|
<phpunit bootstrap="tests/bootstrap.php" colors="true">
|
||||||
|
<logging>
|
||||||
|
<log type="coverage-clover" target="build/logs/clover.xml"/>
|
||||||
|
</logging>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Unirest Test Suite">
|
<testsuite name="Unirest Test Suite">
|
||||||
<directory>./tests</directory>
|
<directory>./tests</directory>
|
||||||
|
|||||||
Reference in New Issue
Block a user