PHP JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cli Added cli script to download default ca bundle Dec 23, 2013
data
install Updated db install dump Dec 23, 2013
public
src/Requestable Fix docblocks Feb 3, 2015
templates Added TLS versions Feb 9, 2015
test Strip the fragment from URIs Jan 30, 2015
vendor
.scrutinizer.yml Fixed scrutinizer config Oct 27, 2013
.travis.yml Added PHP 6.5 to travis tests Jan 30, 2015
README.md Updated readme with install notes Nov 29, 2013
bootstrap.php Implemented private requests Mar 14, 2014
composer.json Added config files Oct 27, 2013
composer.lock Added composer lock file Oct 27, 2013
init.deployment.php Added environment specific settings Nov 29, 2013
init.example.php Added environment specific settings Nov 29, 2013
phpunit.xml.dist Added config files Oct 27, 2013

README.md

Requestable

Webservice to easily send HTTP requests.

This service is useful when testing or debugging other webservice. It supports all HTTP verbs and other HTTP options. It currently uses cURL, but I might switch to Artax at some point. To see the thing in action click here. To see a demo of the API click here

Build status

Build Status Scrutinizer Quality Score Code Coverage

API

This services also provides a public API to make requests. The API is based on simple GET or POST requests and the response is in the JSON format. An example of a API request is:

https://requestable.pieterhordijk.com/api?uri=http%3A%2F%2Fpieterhordijk.com&method=GET

An example response looks like:

{
    "headers": [
        "HTTP\/1.1 301 Moved Permanently\r\nServer: nginx\r\nDate: Sun, 27 Oct 2013 20:09:27 GMT\r\nContent-Type: text\/html\r\nContent-Length: 178\r\nConnection: keep-alive\r\nLocation: https:\/\/pieterhordijk.com\/"
    ],
    "body":"<html>\r\n<head><title>301 Moved Permanently<\/title><\/head>\r\n<body bgcolor=\"white\">\r\n<center><h1>301 Moved Permanently<\/h1><\/center>\r\n<hr><center>nginx<\/center>\r\n<\/body>\r\n<\/html>\r\n",
    "error":null,
    "hash":"Hg7R5T"
}

The API supports CORS so you can easily make requests using Javascript in your applications to the Requestable service.

Installation

  1. Clone that shit
  2. Setup the environment file (copy init.example.com) and point init.deployment.php to it.
  3. Setup the database (run the import file in /install/postgres.sql)
  4. ?
  5. Profit!

Contributors