Download the PHP package lspbupt/yii2-curl without Composer

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

CURL Encapsulation for Yii 2

This extension provides a curl encapsulation for yii2. you can use it for rapid develop;
这个扩展提供了一个基于yii2的curl封装,通过它你能快速的开发。

For license information check the LICENSE-file.
在此处可以查看本扩展的许可

Installation

The preferred way to install this extension is through composer.
推荐的方式是通过composer 进行下载安装composer

Either run
在命令行执行

or add
或加入

to the require-dev section of your composer.json file.
到你的composer.json文件中的require-dev段。

Usage

Once the extension is installed, simply modify your application configuration as follows:
一旦你安装了这个插件,你就可以直接在配置文件中加入如下的代码:

Now we will use baiduApistore to show how can use it:
现在我们用百度apistore来举例说明你如何使用它:

After that, you can use it as follow:
在配置好之后,你可以这么访问它:

as you see, once you configed a api, you can use it anywhere, have fun!
如上所见,一旦你配置好了对接的参数和处理,你就能在任何地方很方便的使用它了,祝您使用愉快!

Usage

1、Debug模式

打开debug时,会将请求的详细信息均打印出来,方便调试。

2、http头设置 我们可以通过如下方法来设置我们想要的header,如下为发送postjson请求的示例。当然,我们也可以直接setPostJson()来设置为postjson请求。

3、一些Tips

4、console模式 正常情况下,我们经常需要在命令行发出一些命令,来跟baidu通信,调试api接口。因此,我们可以使用代码提供的工具来调试:

首先,在console/controllers/main-local.php中加入如下的配置:

其次,我们就可以在命令行使用它进行调试了:

5、利用yii2内置http服务器进行简易调试 只需要加入简单的参数--serve xxxend/web即可抛开nginx的限制,进行原地简易调试。

广告

我们是一群热爱技术,追求卓越的极客,我们乐于做一些对整个社会都有作用的事情,我们希望通过我们的努力来推动整个社会的创新,如果你也一样,欢迎加入我们([email protected])!你也可以通过https://tech.ethercap.com 来了解更多!


All versions of yii2-curl with dependencies

PHP Build Version
Package Version
No informations.
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 lspbupt/yii2-curl contains the following files

Loading the files please wait ....