Skip to content
ICanBoogiePublic

About

Provides an API to handle HTTP requests.

Resources

Code of conduct

Contributing

Stars

5 stars

Watchers

2 watching

Forks

Repository files navigation

HTTP

Release Code Coverage Packagist

The icanboogie/http package provides a foundation to handle HTTP requests, with representations for requests, request files, responses, and headers.

The following example is an overview of request processing:

<?php

namespace ICanBoogie\HTTP;

// The request is usually created from the $_SERVER super global.
$request = Request::from_server();

/* @var ResponderProvider $responder_provider */

// The Responder Provider matches a request with a Responder
$responder = $responder_provider->responder_for_request($request);

// The Responder responds to the request with a Response, it might also throw an exception.
$response = $responder->respond($request);

// The response is sent to the client.
(new SimpleResponseSender())->send($response->finalize($request));

Installation

composer require icanboogie/http

Documentation

  • Request: request creation, parameters, files, and context.
  • Response: response status, streaming, redirects, and file delivery.
  • Headers: header fields manipulation.
  • Responders: responders and their decorators.
  • Exceptions: HTTP-related exceptions.

Continuous Integration

The project is continuously tested by GitHub actions.

Test Static Analysis Code Style

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you're expected to uphold this code.

Contributing

See CONTRIBUTING for details.

License

icanboogie/http is released under the BSD-3-Clause.

About

Provides an API to handle HTTP requests.

Resources

Code of conduct

Contributing

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages