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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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.

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:

Responses
// 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