Download the PHP package pretorien/request without Composer

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

Request bundle

This repository contains Request bundle which helps you to send requests in a public way or behind a proxy. Several commands allow you to fetching and checking proxies.

This bundle based on Symfony HttpClient Component

Installation

Installation using composer :

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

It's necessary to create a Proxy entity extending the bundle one.

Finally, you must update your database :

Configuration

Usage

This bundle provides several commands under the pretorien:proxy: namespace. List them all executing this command:

Fetching Proxies

First of all, you must initialize the proxy list with the pretorien:proxy:fetch command. This is based on fetchers allowing to retrieve data from provides. Currently there is only one : NordVPN. You must therefore configure your cretendials as indicated above.

This command has several options :

Checking Latency

The pretorien:proxy:check command checks existing proxies health and checks if these are anonymous.

Making Requests

RequestService contains all the methods allowing to sending private or public requests. You can use this service directly in your controllers via Autowiring :

Sending public and private Requests

RequestService provides a single request() method to perform all kinds of HTTP requests. All private requests are automatically configured with a proxy.

Two aliases make it easier to send requests

These methods return an ResponseInterface object. Responses are always asynchronous, so that the call to the method returns immediately instead of waiting to receive the response:

Sending concurrent Requests

Many requests can be sent simultaneously thanks to PoolRequest. RequestService provides a single createPoolRequest() method to create a new PoolRequest object having an addRequest method. This allows you to add requests (private or public) to the pool.

Finally, the sendPoolRequest method will allow you to send this pool.

Creating Pool Request

Processing Responses

The response returned by sendPoolRequest method is an object of type PoolResponse which is iterable and provide ResponseInterface object.

License and contributors

Published under the MIT, read the LICENSE file for more information.


All versions of request with dependencies

PHP Build Version
Package Version
Requires psr/log Version ^1.1
symfony/dom-crawler Version ^5.0
symfony/http-client Version ^5.0
symfony/options-resolver Version ^5.0
symfony/config Version ^5.0
symfony/orm-pack Version ^1.0
symfony/browser-kit Version ^5.0
nyholm/psr7 Version ^1.2
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 pretorien/request contains the following files

Loading the files please wait ....