Download the PHP package bibrokhim/http-clients without Composer
On this page you can find all versions of the php package bibrokhim/http-clients. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package http-clients
bibrokhim/http-clients
Typed HTTP clients for the internal microservices (CRM, Products, SMS, Firebase, Media, Helpdesk, OneC, ApiGateway, Rating, ServiceCRM, PsSap, Epamarket, Pos, PollwonProducts, PollwonSite). Installed as a dependency of the consuming Laravel applications; it is not run standalone.
Every client is bound in HttpClientsServiceProvider, reading config/config.php
under the http_clients key. Setting HTTP_CLIENT_CACHE=true swaps the clients
that have a cache decorator (Products, PollwonProducts, CRM) for their
*CacheClient variant.
Pollwon Product Service — site categories
GET {POLLWON_PRODUCTS_BASE_URL}/v1/site/categories backs the public storefront
category tree.
The contract
$parentId—nullis sent withoutparent_id; any other value is sent unchanged asparent_id.$language— when supplied, it is sent unchanged asAccept-Language. The client does not validate, normalise, or replace it. When omitted, the package's existing defaultAccept-Languageheader is used.$slug— when supplied, it is sent unchanged asslug. It can be used together with$parentId; the client does not validate either lookup value.- The decoded JSON body is returned as an
array, in line with the otherPollwonProductsClientmethods. ExistingBaseClienterror behaviour is unchanged.
Caching
With HTTP_CLIENT_CACHE=true the container binds PollwonProductsCacheClient,
which caches under:
One key per lookup and locale, so root, each parent lookup, and each slug lookup
stay independent; a combined parent-and-slug lookup gets its own key as well.
root is used only when both lookups are null, and empty strings remain distinct
values. Only a successful 2xx response is stored.
| Env var | Default | Purpose |
|---|---|---|
POLLWON_PRODUCTS_BASE_URL |
— | Service base URL, ending /api. |
POLLWON_SITE_CATEGORIES_CACHE_TTL |
300 |
Cache lifetime, seconds. |
POLLWON_PRODUCTS_SITE_CATEGORIES_CACHE_TTL is the pre-release name for the TTL
and is still read as a fallback; new deployments should set
POLLWON_SITE_CATEGORIES_CACHE_TTL.
Cached entries expire on the TTL alone — the package has no knowledge of product
service category events, so a change to a category's active, title,
position or parent becomes visible only once the entry lapses. Shorten the
TTL if that window is too wide.
Pollwon Product Service — storefront products
The four public catalog endpoints the storefront reads. Each one forwards its query string verbatim and returns the decoded upstream body unchanged, so the consuming application decides what to validate and what to expose.
The contract
| Method | Upstream path |
|---|---|
siteProducts |
GET /v1/site |
siteProductSearch |
GET /v1/site/search |
siteProduct |
GET /v1/site/{productId} |
siteSimilarProducts |
GET /v1/site/{productId}/similar-products |
$query— sent verbatim, including nested parameters such asspecifications[<uuid>][]andranges[<uuid>][from]. The client neither validates nor renames anything.$language— when supplied it is sent unchanged asAccept-Language; otherwiseBaseClient's default (the host app's locale) applies.- The decoded JSON body is returned as an
array, in line with the otherPollwonProductsClientmethods. ExistingBaseClienterror behaviour is unchanged: 5xx always throwsServerErrorException, and 4xx throwsClientErrorExceptiononly when the caller enabledfailOnClientErrors().
Caching
With HTTP_CLIENT_CACHE=true the container binds PollwonProductsCacheClient,
which caches under:
Only a successful 2xx response is stored. The list and search keys hash the whole parameter set, so every distinct filter, page, sort and locale combination gets its own entry; key order is normalised, value order is not.
| Env var | Default | Purpose |
|---|---|---|
POLLWON_PRODUCTS_BASE_URL |
— | Service base URL, ending /api/pollwon-site. |
POLLWON_SITE_PRODUCTS_CACHE_TTL |
300 |
Cache lifetime for all four, in seconds. |
Pollwon Product Service — sitemap
GET {POLLWON_PRODUCTS_BASE_URL}/v1/site/sitemap returns active products' slug
maps for every available language. It has no parameters or request body.
With HTTP_CLIENT_CACHE=true, successful responses are cached under
pollwon-products.site-sitemap.v1 for 30 minutes by default. Set
POLLWON_SITE_SITEMAP_CACHE_TTL to change the lifetime in seconds.
Pollwon Product Service — counterparty map points
GET {POLLWON_PRODUCTS_BASE_URL}/pollwon-site/v1/site/counterparties/map-points
returns map points within the supplied bounds.
With HTTP_CLIENT_CACHE=true, successful responses are cached per bounds for
300 seconds by default. Set POLLWON_COUNTERPARTIES_MAP_POINTS_CACHE_TTL to
change the lifetime in seconds. Bound key order does not affect the cache key.
Development
The suite runs on a minimal Illuminate container (tests/TestApplication.php)
rather than a full framework install, so the package's production dependency
footprint stays small. tests/helpers.php supplies the app(), config() and
now() helpers a host Laravel application would otherwise provide.
All versions of http-clients with dependencies
illuminate/support Version ^10|^11|^12|^13
illuminate/http Version ^10|^11|^12|^13
guzzlehttp/psr7 Version ^2.0