
templates.plugins.spincast-request.spincast-request.html Maven / Gradle / Ivy
Show all versions of spincast-website Show documentation
{% extends "../../layout.html" %}
{% block sectionClasses %}plugins hasBreadCrumb plugins-spincast-request{% endblock %}
{% block meta_title %}Plugins - Spincast Request{% endblock %}
{% block meta_description %}Spincast Request plugin to access information about HTTP requests.{% endblock %}
{% block scripts %}
{% endblock %}
{% block body %}
Overview
This plugin provides an add-on
to get information
about the current HTTP request.
Make sure you read the section dedicated to the Request Context
for more information on how to use the add-on.
Installation
If you use the spincast-default
artifact and the standard Bootstrapper,
this plugin is already installed by default so you have nothing to do!
If you start from scratch, using the spincast-core
artifact, you can use the
plugin by :
1.
Adding this Maven artifact to your project:
<dependency>
<groupId>org.spincast</groupId>
<artifactId>spincast-plugins-request</artifactId>
<version>{{spincast.spincastCurrrentVersion}}</version>
</dependency>
2. Installing the provided SpincastRequestPluginModule
module to your Guice context.
Plugin class
The class implementing the SpincastPlugin
interface is SpincastRequestPlugin.
Suggested add-on
-
Name :
request()
-
Component : RequestRequestContextAddon
-
Usage : to allow your
Route Handlers
to get information about the current HTTP request.
Example :
public void myRouteHandler(DefaultRequestContext context) {
String userId = context.request().getPathParam("userId");
//...
}
This add-on is already installed by default on the
Request Context type.
Javadoc
{% endblock %}