You are viewing documentation for an outdated version. It is no longer supported!
Accept & Content-Type
The withAccept() and withContentType() are shortcut methods for setting the Accept and Content-Type headers.
Accept
Use withAccept() to set the Accept Http Header.
$builder = $client
->withAccept('text/xml');
Content-Type
Use withContentType() to set your request's Content-Type.
$builder = $client
->withContentType('text/xml');