Object - http : Filter

Representation of a HTTP Request Filter. This filter will be applied before the request is dispatched to the relevant resource. Any Filter implementation should be structurally similar to the Filter object.

filterRequest

(Caller caller, Request request, FilterContext context)

returns boolean

Request filter function. If a false is returned the response should have been sent from this function as it will not be dispatched to the next filter or the resource.

Parameters

  • caller Caller
  • The http caller

  • request Request
  • An inbound HTTP request message

  • Return Type

    (boolean)
  • True if the filter succeeds

filterResponse

(Response response, FilterContext context)

returns boolean

Response filter function. If a false is returned a 500 Internal Server Error would be sent to the client.

Parameters

  • response Response
  • An outbound HTTP response message

  • Return Type

    (boolean)
  • True if the filter succeeds