slim.index.mustache Maven / Gradle / Ivy
{{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