Download the PHP package cdcchen/curl-client without Composer

On this page you can find all versions of the php package cdcchen/curl-client. 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 curl-client

CURL Http Client

composer 安装

使用教程

第一步:实例化HttpRequest

第二步:发起请求

第三步:获取返回相关数据

返回的$response类型为HttpResponseHttpResponse会自动根据返回的Content-Type解析返回的数据。目前支持以下格式:

如果已经明确知道返回数据的格式,也可以显式的指定$response的format属性:

然后可以直接通过$response->getData()来获取到解析之后的数据。

获取 Status Code

获取原始 body 数据:

获取返回的 Headers

获取 Cookies

设置超时时间

设置 HttpRequest 请求

设置请求方法

设置请求参数

设置post body

设置Header

Header shortcut

设置Cookies

使用SSL

上传文件

$file 可以为文件路径,也可以为CURLFile实例。

设置发起请求时body的格式化方式

request会自动根据format的值来格式化data

format的取值如下:

配置 Curl Options


All versions of curl-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-curl Version *
cdcchen/psr7 Version ^1.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 cdcchen/curl-client contains the following files

Loading the files please wait ....