Class JsonpFilter

  • All Implemented Interfaces:
    Uniform

    public class JsonpFilter
    extends Filter
    Filter that converts response entity of the JSON media type into a JSONP callback document. Make sure that you properly pass a "callback" query parameter in the URI query string with the name of your JavaScrip callback method. See JsonpRepresentation for the actual wrapper representation used internally.
    • Constructor Detail

      • JsonpFilter

        public JsonpFilter​(Context context)
        Constructor.
        Parameters:
        context - The context.
    • Method Detail

      • afterHandle

        public void afterHandle​(Request request,
                                Response response)
        Assumes that there is a "callback" query parameter available in the URI query string, containing the name of the JavaScript callback method.
        Overrides:
        afterHandle in class Filter
        Parameters:
        request - The request to handle.
        response - The response to update.