Page tree
Skip to end of metadata
Go to start of metadata

This page is maintained to keep the documentation smaller when it comes to generic requests that can be used in all wrapper modules. Methods at this page is normally supported by CurlWrapper, NetWrapper, SimpleStreamWrapper.

A big difference between 6.0 and 6.1 is the chaining, which did not exist in the old versions as it supported PHP 5.3 in the "good old (horrible) times". Almost everything in netcurl 6.1 is chained. There are however limits in different kind of places with makes requests with the obsolete PHP versions impossible. All autotests are running with PHP 5.6 or higher. PHP 5.4 does not work with autotests anymore, but could still be compatible in rare cases (I really don't know).

getParsed(), getBody(), getHeader(), getCode()

By using getBody(), you can also fetch the data unparsed. Likewise, you can also fetch other data from the request, like for example the returned headers from the server with a getHeader()-method. By running getHeader() without an argument, you'll ge the entire header, so if you'd like to fetch specific header rows, you can add a parameter like the example below:

// Returns the server name. Example: Apache/2.4.29 (Ubuntu)
$serverName = $wrapper->getHeader('Server');
// Returns full HTTP header response with code. Example: 200 OK
$httpHeadResponse = $wrapper->getHeader('HTTP');
// Returns the HTTP header response code only. Example: 200
$httpCode = $wrapper->getCode();
  • No labels