docs/class-GuzzleHttp.Exception.RequestException.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class GuzzleHttp\Exception\RequestException | ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK</title>
<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">
</head>
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li>
<a href="namespace-Baguette.html">
Baguette<span></span>
</a>
<ul>
<li>
<a href="namespace-Baguette.Mastodon.html">
Mastodon<span></span>
</a>
<ul>
<li class="main">
<a href="namespace-Baguette.Mastodon.Config.html">
Config </a>
</li>
<li class="main">
<a href="namespace-Baguette.Mastodon.Entity.html">
Entity </a>
</li>
<li class="main">
<a href="namespace-Baguette.Mastodon.Grant.html">
Grant </a>
</li>
<li class="main">
<a href="namespace-Baguette.Mastodon.Service.html">
Service </a>
</li>
</ul></li></ul></li>
<li class="active">
<a href="namespace-GuzzleHttp.html">
GuzzleHttp<span></span>
</a>
<ul>
<li>
<a href="namespace-GuzzleHttp.Cookie.html">
Cookie </a>
</li>
<li class="active">
<a href="namespace-GuzzleHttp.Exception.html">
Exception </a>
</li>
<li>
<a href="namespace-GuzzleHttp.Handler.html">
Handler </a>
</li>
<li>
<a href="namespace-GuzzleHttp.Promise.html">
Promise </a>
</li>
</ul></li>
<li>
<a href="namespace-Psr.html">
Psr<span></span>
</a>
<ul>
<li>
<a href="namespace-Psr.Http.html">
Http<span></span>
</a>
<ul>
<li>
<a href="namespace-Psr.Http.Message.html">
Message </a>
</li>
</ul></li></ul></li>
<li>
<a href="namespace-Teto.html">
Teto<span></span>
</a>
<ul>
<li>
<a href="namespace-Teto.Object.html">
Object </a>
</li>
</ul></li>
</ul>
</div>
<hr>
<div id="elements">
<h3>Interfaces</h3>
<ul>
<li><a href="class-GuzzleHttp.Exception.GuzzleException.html">GuzzleException</a></li>
</ul>
<h3>Exceptions</h3>
<ul>
<li><a href="class-GuzzleHttp.Exception.BadResponseException.html">BadResponseException</a></li>
<li><a href="class-GuzzleHttp.Exception.ClientException.html">ClientException</a></li>
<li><a href="class-GuzzleHttp.Exception.ConnectException.html">ConnectException</a></li>
<li class="active"><a href="class-GuzzleHttp.Exception.RequestException.html">RequestException</a></li>
<li><a href="class-GuzzleHttp.Exception.SeekException.html">SeekException</a></li>
<li><a href="class-GuzzleHttp.Exception.ServerException.html">ServerException</a></li>
<li><a href="class-GuzzleHttp.Exception.TooManyRedirectsException.html">TooManyRedirectsException</a></li>
<li><a href="class-GuzzleHttp.Exception.TransferException.html">TransferException</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text" placeholder="Search">
</form>
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="namespace-GuzzleHttp.Exception.html" title="Summary of GuzzleHttp\Exception"><span>Namespace</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
</ul>
<ul>
</ul>
</div>
<div id="content" class="class">
<h1>Class RequestException</h1>
<div class="description">
<p>HTTP Request exception</p>
</div>
<dl class="tree">
<dd style="padding-left:0px">
Exception
implements
<span>Throwable</span>
</dd>
<dd style="padding-left:30px">
<img src="resources/inherit.png" alt="Extended by">
RuntimeException
</dd>
<dd style="padding-left:60px">
<img src="resources/inherit.png" alt="Extended by">
<a href="class-GuzzleHttp.Exception.TransferException.html"><span>GuzzleHttp\Exception\TransferException</span></a>
implements
<a href="class-GuzzleHttp.Exception.GuzzleException.html"><span>GuzzleHttp\Exception\GuzzleException</span></a>
</dd>
<dd style="padding-left:90px">
<img src="resources/inherit.png" alt="Extended by">
<b><span>GuzzleHttp\Exception\RequestException</span></b>
</dd>
</dl>
<div>
<h4>Direct known subclasses</h4>
<a href="class-GuzzleHttp.Exception.BadResponseException.html">GuzzleHttp\Exception\BadResponseException</a>,
<a href="class-GuzzleHttp.Exception.ConnectException.html">GuzzleHttp\Exception\ConnectException</a>,
<a href="class-GuzzleHttp.Exception.TooManyRedirectsException.html">GuzzleHttp\Exception\TooManyRedirectsException</a>
</div>
<div>
<h4>Indirect known subclasses</h4>
<a href="class-GuzzleHttp.Exception.ClientException.html">GuzzleHttp\Exception\ClientException</a>,
<a href="class-GuzzleHttp.Exception.ServerException.html">GuzzleHttp\Exception\ServerException</a>
</div>
<div class="info">
<b>Namespace:</b> <a href="namespace-GuzzleHttp.html">GuzzleHttp</a>\<a href="namespace-GuzzleHttp.Exception.html">Exception</a><br>
<b>Located at</b> <a href="source-class-GuzzleHttp.Exception.RequestException.html#9-210" title="Go to source code">Exception/RequestException.php</a>
<br>
</div>
<table class="summary methods" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#23-38" title="Go to source code">__construct</a>( <span> <var>$message</var></span>, <span><code><a href="class-Psr.Http.Message.RequestInterface.html">Psr\Http\Message\RequestInterface</a></code> <var>$request</var></span>, <span><code><a href="class-Psr.Http.Message.ResponseInterface.html">Psr\Http\Message\ResponseInterface</a></code> <var>$response</var> = <span class="php-keyword1">null</span></span>, <span>Exception <var>$previous</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$handlerContext</var> = [] </span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
<h4>Overrides</h4>
<div class="list"><code>Exception::__construct()</code></div>
</div>
</div></td>
</tr>
<tr data-order="wrapException" id="_wrapException">
<td class="attributes"><code>
public static
<code><a href="class-GuzzleHttp.Exception.RequestException.html">GuzzleHttp\Exception\RequestException</a></code>
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_wrapException">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#40-53" title="Go to source code">wrapException</a>( <span><code><a href="class-Psr.Http.Message.RequestInterface.html">Psr\Http\Message\RequestInterface</a></code> <var>$request</var></span>, <span>Exception <var>$e</var></span> )</code>
<div class="description short">
<p>Wrap non-RequestExceptions with a RequestException</p>
</div>
<div class="description detailed hidden">
<p>Wrap non-RequestExceptions with a RequestException</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$request</var></dt>
<dd></dd>
<dt><var>$e</var></dt>
<dd></dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
<code><a href="class-GuzzleHttp.Exception.RequestException.html">GuzzleHttp\Exception\RequestException</a></code>
</div>
</div>
</div></td>
</tr>
<tr data-order="create" id="_create">
<td class="attributes"><code>
public static
<code><a href="class-GuzzleHttp.Exception.RequestException.html">GuzzleHttp\Exception\RequestException</a></code>
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_create">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#55-112" title="Go to source code">create</a>( <span><code><a href="class-Psr.Http.Message.RequestInterface.html">Psr\Http\Message\RequestInterface</a></code> <var>$request</var></span>, <span><code><a href="class-Psr.Http.Message.ResponseInterface.html">Psr\Http\Message\ResponseInterface</a></code> <var>$response</var> = <span class="php-keyword1">null</span></span>, <span>Exception <var>$previous</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$ctx</var> = [] </span> )</code>
<div class="description short">
<p>Factory method to create a new exception with a normalized error message</p>
</div>
<div class="description detailed hidden">
<p>Factory method to create a new exception with a normalized error message</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$request</var></dt>
<dd>Request</dd>
<dt><var>$response</var></dt>
<dd>Response received</dd>
<dt><var>$previous</var></dt>
<dd>Previous exception</dd>
<dt><var>$ctx</var></dt>
<dd>Optional handler context.</dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
<code><a href="class-GuzzleHttp.Exception.RequestException.html">GuzzleHttp\Exception\RequestException</a></code>
</div>
</div>
</div></td>
</tr>
<tr data-order="getResponseBodySummary" id="_getResponseBodySummary">
<td class="attributes"><code>
public static
string|null
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getResponseBodySummary">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#114-146" title="Go to source code">getResponseBodySummary</a>( <span><code><a href="class-Psr.Http.Message.ResponseInterface.html">Psr\Http\Message\ResponseInterface</a></code> <var>$response</var></span> )</code>
<div class="description short">
<p>Get a short summary of the response</p>
</div>
<div class="description detailed hidden">
<p>Get a short summary of the response</p>
<p>Will return <code>null</code> if the response is not printable.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$response</var></dt>
<dd></dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
string|null
</div>
</div>
</div></td>
</tr>
<tr data-order="getRequest" id="_getRequest">
<td class="attributes"><code>
public
<code><a href="class-Psr.Http.Message.RequestInterface.html">Psr\Http\Message\RequestInterface</a></code>
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getRequest">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#166-174" title="Go to source code">getRequest</a>( )</code>
<div class="description short">
<p>Get the request that caused the exception</p>
</div>
<div class="description detailed hidden">
<p>Get the request that caused the exception</p>
<h4>Returns</h4>
<div class="list">
<code><a href="class-Psr.Http.Message.RequestInterface.html">Psr\Http\Message\RequestInterface</a></code>
</div>
</div>
</div></td>
</tr>
<tr data-order="getResponse" id="_getResponse">
<td class="attributes"><code>
public
<code><a href="class-Psr.Http.Message.ResponseInterface.html">Psr\Http\Message\ResponseInterface</a></code>|null
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getResponse">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#176-184" title="Go to source code">getResponse</a>( )</code>
<div class="description short">
<p>Get the associated response</p>
</div>
<div class="description detailed hidden">
<p>Get the associated response</p>
<h4>Returns</h4>
<div class="list">
<code><a href="class-Psr.Http.Message.ResponseInterface.html">Psr\Http\Message\ResponseInterface</a></code>|null
</div>
</div>
</div></td>
</tr>
<tr data-order="hasResponse" id="_hasResponse">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_hasResponse">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#186-194" title="Go to source code">hasResponse</a>( )</code>
<div class="description short">
<p>Check if a response was received</p>
</div>
<div class="description detailed hidden">
<p>Check if a response was received</p>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="getHandlerContext" id="_getHandlerContext">
<td class="attributes"><code>
public
array
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getHandlerContext">#</a>
<code><a href="source-class-GuzzleHttp.Exception.RequestException.html#196-209" title="Go to source code">getHandlerContext</a>( )</code>
<div class="description short">
<p>Get contextual information about the error from the underlying handler.</p>
</div>
<div class="description detailed hidden">
<p>Get contextual information about the error from the underlying handler.</p>
<p>The contents of this array will vary depending on which handler you are
using. It may also be just an empty array. Relying on this data will
couple you to a specific handler, but can give more debug information
when needed.</p>
<h4>Returns</h4>
<div class="list">
array
</div>
</div>
</div></td>
</tr>
</table>
<table class="summary inherited">
<caption>Methods inherited from Exception</caption>
<tr>
<td><code>
__toString(),
__wakeup(),
getCode(),
getFile(),
getLine(),
getMessage(),
getPrevious(),
getTrace(),
getTraceAsString()
</code></td>
</tr>
</table>
<table class="summary inherited">
<caption>Properties inherited from Exception</caption>
<tr>
<td><code>
<var>$code</var>,
<var>$file</var>,
<var>$line</var>,
<var>$message</var>
</code></td>
</tr>
</table>
</div>
<div id="footer">
ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>