dankkomcg/stitch

Said to your API how it does his work. API Rest based on HTTP commands


Keywords
stitch, APIRest, dankkomcg, Simple API, Lightly API, api-middleware, content-type, json, regexp, rest-api, rx
License
MIT

Documentation

State Machine PHP API based on HTTP protocols: StitchAPI

Dictionary

Guideliness

Tutorials

Updates

  • RexPI include to do states matched with urls.

Example

(new StitchAPI())
->get("phpinfo", function( $request, $response ) {

  $response->write_head(
    array(
      "content-type" => 'text/html',
      "access-control-allow-origin" => "*",
      "server" => "Stitch Server API",
      "x-powered-by" => "StichAPI",
      "some-data-from-db" => "sometvalue1234",
      "status" => 200
    )
  );

  phpinfo();

})

// View http://yourserver/stitch/index.php?url=phpinfo