httpful icon indicating copy to clipboard operation
httpful copied to clipboard

Added possibility to limit the amount of data retrieved

Open daigo75 opened this issue 11 years ago • 4 comments

Ref. feature request https://github.com/nategood/httpful/issues/137.

Usage example

$Response = \Httpful\Request::get('http://somesite.com')
    ->limit(1000) // Limit the amount of bytes retrieved
    ->send();

daigo75 avatar Sep 17 '14 14:09 daigo75

Note: the coding style used for the library is different from the one I normally use, therefore you might need to make a couple of adjustments.

daigo75 avatar Sep 17 '14 14:09 daigo75

Hi @daigo75. Please convert the spacing in here to spaces as opposed to hard tabs for consistency. Thanks!

nategood avatar Oct 21 '14 19:10 nategood

I forgot, my editor is set to tabs (never liked spaces much, too rigid). I will review the files and make the conversion.

By the way, technically, spaces are hard indentation, while tabs are a soft one (two spaces are always two spaces, while tabs can be displayed as 1, 2, 3 or more). :)

daigo75 avatar Oct 21 '14 19:10 daigo75

Done! Tabs are now spaces.

daigo75 avatar Oct 21 '14 19:10 daigo75