All Downloads are FREE. Search and download functionalities are using the official Maven repository.

slim.index.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{httpMethod}}('{{{basePathWithoutHost}}}{{{path}}}', function($request, $response, $args) {
            {{#hasHeaderParams}}$headers = $request->getHeaders();{{/hasHeaderParams}}
            {{#hasQueryParams}}$queryParams = $request->getQueryParams();
            {{#queryParams}}${{paramName}} = $queryParams['{{paramName}}'];{{newline}}    {{/queryParams}}{{/hasQueryParams}}
            {{#hasFormParams}}{{#formParams}}${{paramName}} = $args['{{paramName}}'];{{newline}}    {{/formParams}}{{/hasFormParams}}
            {{#hasBodyParam}}$body = $request->getParsedBody();{{/hasBodyParam}}
            $response->write('How about implementing {{nickname}} as a {{httpMethod}} method ?');
            return $response;
            });

{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}

$app->run();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy