slim

What is the purpose of Middleware in relation to APIs and web applications made in Slim?

I am Reading regarding middleware in the Slim framework, however, I could not understand the purpose of Middleware in relat ... TTP protocol? And in what sense it controls the whole HTTP? if it is to give code examples, I would like that it was in PHP.

SlimFramework: Method not allowed. Must be one of: GET

I am having difficulty solving an error that is giving in slim framework. I have a contact page that is accessed /p / contact ... })->setName('site.pagina'); What I need is to take the data entered in the form via post to the url / p / contact

Slim framework status code 404

When making requests I get the following error. XMLHttpRequest cannot load http://www.domain.com.br/api . Response for p ... s looks like this: http://pastebin.com/HqMQM5xU When I'm not within my domain it works. So I deduce that it is .htaccess