NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class RequestException

Http request exception

  Exception
  RuntimeException
  Guzzle\Common\Exception\RuntimeException implements Guzzle\Common\Exception\GuzzleException
  Guzzle\Http\Exception\RequestException implements Guzzle\Http\Exception\HttpException

### Direct known subclasses

`Guzzle\Http\Exception\BadResponseException`, `Guzzle\Http\Exception\CurlException`

### Indirect known subclasses

`Aws\Common\Exception\TransferException`, `Guzzle\Http\Exception\ClientErrorResponseException`, `Guzzle\Http\Exception\ServerErrorResponseException`, `Guzzle\Http\Exception\TooManyRedirectsException`

Namespace: Guzzle\Http\Exception
Located at Guzzle/Http/Exception/RequestException.php

## Methods summary

- `public` `setRequest ( Guzzle\Http\Message\RequestInterface $request )`

  Set the request that caused the exception

- `public` `getRequest ( )`

  Get the request that caused the exception

## Methods detail

# `public `Guzzle\Http\Exception\RequestException``
`setRequest( `Guzzle\Http\Message\RequestInterface` $request )`

Set the request that caused the exception

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Request to set

#### Returns

``Guzzle\Http\Exception\RequestException``
# `public `Guzzle\Http\Message\RequestInterface``
`getRequest( )`

Get the request that caused the exception

#### Returns

``Guzzle\Http\Message\RequestInterface``

### Methods inherited from Exception

`__construct()`, `__toString()`, `__wakeup()`, `getCode()`, `getFile()`, `getLine()`, `getMessage()`, `getPrevious()`, `getTrace()`, `getTraceAsString()`

### Magic methods summary

## Properties summary

`protected `Guzzle\Http\Message\RequestInterface`` | $request | #

### Properties inherited from Exception

`$code`, `$file`, `$line`, `$message`