Download the PHP package webman-tech/laravel-http-client without Composer

On this page you can find all versions of the php package webman-tech/laravel-http-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 laravel-http-client

webman-tech/laravel-http-client

Laravel illuminate/http 中的 HttpClient for webman

介绍

站在巨人(laravel)的肩膀上使 http 请求使用更加可靠便捷

所有方法和配置与 laravel 几乎一模一样,因此使用方式完全参考 Laravel文档 即可

安装

使用

所有 API 同 laravel,以下仅对有些特殊的操作做说明

Facade 入口

使用 WebmanTech\LaravelHttpClient\Facades\Http 代替 Illuminate\Support\Facades\Http

请求日志

配置文件 config/plugin/webman-tech/laravel-http-client/app.php 中的 log 栏目可以配置日志相关

默认未启用

支持配置各种情况日志:

默认的 guzzle options 配置

配置文件 config/plugin/webman-tech/laravel-http-client/app.php 中的 guzzle 栏目可以配置 guzzle 的默认配置

会在每次发送请求时使用该默认值

快速定义与简化 api 调用

如果对同一个站点的接口请求比较多,建议通过 macros 来预定义一些接口的请求信息(比如 baseUrl、Headers 等)

配置文件 config/plugin/webman-tech/laravel-http-client/app.php 中的 macros 栏目中

举例:

config

使用

建议

为了 macros 的代码提示,建议新建一个 support/facade/Http 继承自 WebmanTech\LaravelHttpClient\Facades\Http,然后顶部添加注释用于代码提示

例如:


All versions of laravel-http-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
illuminate/http Version >=8.0
guzzlehttp/guzzle Version >=6.5
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 webman-tech/laravel-http-client contains the following files

Loading the files please wait ....