src/ScottRobertson/Premailer/Request.php
private function request(array $params = array())
  {
    $request = $this->client->createRequest('POST', $this->url);

    $body = $request->getBody();
    foreach ($params as $key => $value) {
      $body->setField($key, $value);
    }

    try {
      $response = $this->client->send($request);
    } catch (\Exception $e) {
      throw new \ScottRobertson\Premailer\Exception\Request($e->getMessage());
    }

    return new Response(
      $response->json(),
      $this->client
    );
  }
private function request(array $params = array())
  {
    $request = $this->client->createRequest('POST', $this->url);

    $body = $request->getBody();
    foreach ($params as $key => $value) {
      $body->setField($key, $value);
    }

    try {
      $response = $this->client->send($request);
    } catch (\Exception $e) {
      throw new \ScottRobertson\Premailer\Exception\Request($e->getMessage());
    }

    return new Response(
      $response->json(),
      $this->client
    );
  }
private function request ( array $ params = array ( ) ) { $ request = $ this -> client -> createRequest ( 'POST' , $ this -> url ) ; $ body = $ request -> getBody ( ) ; foreach ( $ params as $ key => $ value ) { $ body -> setField ( $ key , $ value ) ; } try { $ response = $ this -> client -> send ( $ request ) ; } catch ( \ Exception $ e ) { throw new \ ScottRobertson \ Premailer \ Exception \ Request ( $ e -> getMessage ( ) ) ; } return new Response ( $ response -> json ( ) , $ this -> client ) ; }
Make the request to Premailer
@param  array  $params
@return \ScottRobertson\Premailer\Response
Make the request to Premailer