PHP code example of polysource / adapter-http

1. Go to this page and download the library: Download polysource/adapter-http library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

polysource / adapter-http example snippets


return [
    Polysource\Adapter\Http\PolysourceAdapterHttpBundle::class => ['all' => true],
];

final class LinkHeaderPaginationStrategy implements PaginationStrategyInterface
{
    /** @return array<string, scalar|list<scalar>> query params to add to the request URI */
    public function buildQueryParams(DataQuery $query): array { /* … */ }

    /** @return array{items: list<array<string, mixed>>, total: ?int, nextCursor: ?string, prevCursor: ?string} */
    public function parseResponse(array $body, array $headers): array { /* parse the Link header */ }
}