Download the PHP package xp-framework/http without Composer
On this page you can find all versions of the php package xp-framework/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xp-framework/http
More information about xp-framework/http
Files in xp-framework/http
Package http
Short Description HTTP protocol support for the XP Framework
License BSD-3-Clause
Homepage http://xp-framework.net/
Informations about the package http
HTTP protocol support for the XP Framework
Implements HTTP (HyperText Transfer Protocol) and provides a client to interact with HTTP servers. The HttpConnection
is the entry point class.
Methods
Different request methods are handled by HttpConnection
class methods as follows:
- GET - via
get()
- POST - via
post()
- HEAD - via
head()
- PUT - via
put()
- PATCH - via
patch()
- DELETE - via
delete()
- OPTIONS - via
options()
- TRACE - via
trace()
Other methods (e.g. MKCOL
from WebDAV) are supported via request()
.
Headers
The following code will show the response headers for a HEAD request:
Getting data
SSL support
This API also supports SSL connections - based on the scheme given to HttpConnection
's constructor the HttpRequestFactory
class will create an SSL connection. This is transparent from the outside, the rest of the calls are the same!
Example:
Note: SSL connections depend on either the PHP extension curl
or openssl
.
All versions of http with dependencies
xp-framework/logging Version ^11.0 | ^10.0 | ^9.0 | ^8.0 | ^7.0 | ^6.5
xp-framework/networking Version ^10.0 | ^9.0 | ^8.0 | ^7.0 | ^6.6
php Version >=7.0.0