__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Aws\Api\Serializer;
use Aws\Api\Service;
use Aws\CommandInterface;
use Aws\EndpointV2\EndpointProviderV2;
use Aws\EndpointV2\EndpointV2SerializerTrait;
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\RequestInterface;
/**
* Serializes a query protocol request.
* @internal
*/
class QuerySerializer
{
use EndpointV2SerializerTrait;
private $endpoint;
private $api;
private $paramBuilder;
public function __construct(
Service $api,
$endpoint,
callable $paramBuilder = null
) {
$this->api = $api;
$this->endpoint = $endpoint;
$this->paramBuilder = $paramBuilder ?: new QueryParamBuilder();
}
/**
* When invoked with an AWS command, returns a serialization array
* containing "method", "uri", "headers", and "body" key value pairs.
*
* @param CommandInterface $command Command to serialize into a request.
* @param $endpointProvider Provider used for dynamic endpoint resolution.
* @param $clientArgs Client arguments used for dynamic endpoint resolution.
*
* @return RequestInterface
*/
public function __invoke(
CommandInterface $command,
$endpoint = null
)
{
$operation = $this->api->getOperation($command->getName());
$body = [
'Action' => $command->getName(),
'Version' => $this->api->getMetadata('apiVersion')
];
$commandArgs = $command->toArray();
// Only build up the parameters when there are parameters to build
if ($commandArgs) {
$body += call_user_func(
$this->paramBuilder,
$operation->getInput(),
$commandArgs
);
}
$body = http_build_query($body, '', '&', PHP_QUERY_RFC3986);
$headers = [
'Content-Length' => strlen($body),
'Content-Type' => 'application/x-www-form-urlencoded'
];
if ($endpoint instanceof RulesetEndpoint) {
$this->setEndpointV2RequestOptions($endpoint, $headers);
}
return new Request(
'POST',
$this->endpoint,
$headers,
$body
);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Ec2ParamBuilder.php | File | 819 B | 0777 |
|
| JsonBody.php | File | 3.01 KB | 0777 |
|
| JsonRpcSerializer.php | File | 2.32 KB | 0777 |
|
| QueryParamBuilder.php | File | 3.92 KB | 0777 |
|
| QuerySerializer.php | File | 2.23 KB | 0777 |
|
| RestJsonSerializer.php | File | 1.11 KB | 0777 |
|
| RestSerializer.php | File | 9.97 KB | 0777 |
|
| RestXmlSerializer.php | File | 1.25 KB | 0777 |
|
| XmlBody.php | File | 5.78 KB | 0777 |
|