Download the PHP package ksuzuki2016/laravel-http-client without Composer

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

laravel-http-client

LaravelのHttpファサードを拡張して利用するライブラリ

基本的な機能はLaravel HTTPクライアントと同じ、その他いくつかの機能追加

インストール

Chromeをサーバーへインストール

google-chromeとかgoogle-chrome-stableあたりが入ってれば大丈夫

ドライバの追加

現状で利用可能なバーションは70から73のバージョン限定

設定

使い方

managerクラスからクライアントドライバを呼び出して使うかhttp-clientを呼び出す

HTTP_FACADE_OVERWRITEtrueが設定されていればHttpファサードを上書きする

chromedriver

HTTP_CLIENT_CHROME_PATHに設定したディレクトリ内のドライバを利用

Response拡張

responsecrawlerstacksを追加

crawlerSymfony\Component\DomCrawler\Crawlerを返す

stacks配列を返す

2021.3.27 schemaを追加

<script type="application/ld+json">...</script>のデータを取得してCollectionとして返す

javascript browser macro

javascriptの実行が可能

browserCallbackに設定

戻り値はレスポンスヘッダーのstacksに格納される

スクリプトエラー

マクロ実行中に発生したエラーログはレスポンスヘッダーのerrorsに格納されます

Response Observer

レスポンスに対して処理を行う

responseObserverに設定

実装方法

ResponseObserverInterfaceを実装して作成するかResponseObserverを継承する

連続したObserverの処理を止めたい場合はgetObservationからfalseを返却する

successfulfailedのから返却されたHttpClientResponseで次の処理を行う(返却しなければオリジナルの値を使う)

HttpClientResponseの値を操作する

ResponseObserver等で値の変更が可能

setStacks( array $stacks ):self

シンプルな例

setJson( $key , $value = null ):self

値を変更して次の処理へ渡す場合returnで返却

Make Command

stubからひな形を作成できます

Browser Macro

Browser Macroのひな形を作成

Response Observer

Response Observerのひな形を作成

Http Client Request

パラメーターを設定したPendingRequestを呼び出す為のクラス

user agentを設定したクライアントの例

利用方法


All versions of laravel-http-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3 || >=8.0
ext-json Version *
ext-mbstring Version *
ext-zlib Version *
ext-dom Version *
ext-simplexml Version *
symfony/dom-crawler Version ^5.0
php-webdriver/webdriver Version ^1.8
laravel/dusk Version ^6.0
symfony/process Version ^5.1||^6.0
guzzlehttp/guzzle Version ^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 ksuzuki2016/laravel-http-client contains the following files

Loading the files please wait ....