Skip to content


Add note about getContent/getHeaders to the README #56

wants to merge 1 commit into from

5 participants


It took me a while to work out how to get just the content from a response from a request. No reason not to add this to the README.


+1 for this.

It's really a common behaviour to get header or content of a page, and this library is really simple to use, except you have to navigate to find out the right method to manage the response.
With this two lines addiction you save a lot of time to poor soul developer like me :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2012
  1. Add note about getContent/getHeaders to the README

    Michael Heap committed
Showing with 3 additions and 1 deletion.
  1. +3 −1
@@ -7,7 +7,9 @@ $browser = new Buzz\Browser();
$response = $browser->get('');
echo $browser->getLastRequest()."\n";
-echo $response;
+// $response is an object.
+// You can use $response->getContent() or $response->getHeaders() to get only one part of the response.
+echo $response;
You can also use the low-level HTTP classes directly.
Something went wrong with that request. Please try again.