Download the PHP package f-oris/easy-httpclient without Composer

On this page you can find all versions of the php package f-oris/easy-httpclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package easy-httpclient

Foris/Easy/HttpClient

基于Guzzlehttp组件包简单封装的Httpclient组件包

Build Status codecov Latest Stable Version Latest Unstable Version Total Downloads

安装

配置说明

参考config.example.php文件说明

基本用法

1. 发起GET请求

2. POST表单数据

3. POST json数据

4. 上传文件

5. 发起其他类型请求

请求选项参数说明

1. 默认curl选项参数

HttpClient$options属性中,将CURLOPT_IPRESOLVE设置为CURL_IPRESOLVE_V4,不需要的情况下可以继续该类重写改属性实现。

2. 自定义选项参数cast_response

使用中间件

1. 使用日志中间件

添加了日志中间件后,再通过httpClient发起网络请求,可以在相关日志内容中找到对应的请求日志

2. 使用重试中间件

`

3. 使用自定义中间件

中间件的编码规范可以参考Guzzlehttp相关文档说明

测试辅助组件使用

1. 断言发起了Get请求

2. 断言发起了Post请求

3. 断言发起了Post json请求

4. 断言发起了文件上传请求

5. 断言发起其他类型请求以及参数

6. 模拟请求结果

7. 模拟发起请求过程中出现异常

License

MIT License

Copyright (c) 2019-present F.oris [email protected]


All versions of easy-httpclient with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-json Version *
ext-curl Version *
ext-mbstring Version *
ext-simplexml Version *
ext-libxml Version *
psr/log Version ~1.0
guzzlehttp/guzzle Version ^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package f-oris/easy-httpclient contains the following files

Loading the files please wait ....