src/CloudSearchDomain/CloudSearchDomainClient.php
public static function convertGetToPost(RequestInterface $r)
    {
        if ($r->getMethod() === 'POST') {
            return $r;
        }

        $query = $r->getUri()->getQuery();
        $req = $r->withMethod('POST')
            ->withBody(Psr7\stream_for($query))
            ->withHeader('Content-Length', strlen($query))
            ->withHeader('Content-Type', 'application/x-www-form-urlencoded')
            ->withUri($r->getUri()->withQuery(''));
        return $req;
    }
public static function convertGetToPost(RequestInterface $r)
    {
        if ($r->getMethod() === 'POST') {
            return $r;
        }

        $query = $r->getUri()->getQuery();
        $req = $r->withMethod('POST')
            ->withBody(Psr7\stream_for($query))
            ->withHeader('Content-Length', strlen($query))
            ->withHeader('Content-Type', 'application/x-www-form-urlencoded')
            ->withUri($r->getUri()->withQuery(''));
        return $req;
    }
public static function convertGetToPost ( RequestInterface $ r ) { if ( $ r -> getMethod ( ) === 'POST' ) { return $ r ; } $ query = $ r -> getUri ( ) -> getQuery ( ) ; $ req = $ r -> withMethod ( 'POST' ) -> withBody ( Psr7 \ stream_for ( $ query ) ) -> withHeader ( 'Content-Length' , strlen ( $ query ) ) -> withHeader ( 'Content-Type' , 'application/x-www-form-urlencoded' ) -> withUri ( $ r -> getUri ( ) -> withQuery ( '' ) ) ; return $ req ; }
Converts default GET request to a POST request

Avoiding length restriction in query

@param RequestInterface $r GET request to be converted
@return RequestInterface $req converted POST request
Converts default GET request to a POST request