Ticket #486 (closed Enhancement: fixed)

Opened 7 years ago

Last modified 7 years ago

New client-side extension point: pre_send_request

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.2
Component: DeepaMehta Standard Distribution Version: 4.1
Keywords: Cc: dgf, Malte
Complexity: 3 Area: Application Framework / API
Module: deepamehta-webclient

Description

This is needed e.g. by the Caching plugin to add a If-Unmodified-Since header to a PUT request.

Change History

comment:1 Changed 7 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 7 years ago by jri

Webclient fix: no side effect while update (#486).

Construction of the object model passed to a topic/association update request no longer manipulates the dm4c.selected_object in place. This allows a plugin to investigate the selected object's enrichments (e.g. timestamps, access control information) before the request is actually send.

In preparation of #486 ("New client-side extension point: pre_send_request").

See ticket 486.

Changeset: 7b228af58739dc6f2dce844e922fdc759a7ac03f

Correction of previous commit message: max-age=0 is set as Cache-Control header of course (not Last-Modified header).

comment:3 Changed 7 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed

Webclient: new event pre_send_request (#486).

Allows plugins to investigate and manipulate a request before it is send to the server.
One "request" argument is passed to the handler, an object with 4 properties:

method: # "GET", "PUT", "POST", "DELETE" (string)
uri: # absolute path including query parameters (string), e.g. "/core/topic/2695?fetch_composite=false"
headers: # the headers as key-value pairs (object), possibly empty
data: # the message body, possibly undefined

Close ticket 486.

Changeset: 44b274506189bf6fc68a9e0457626435fb51ab8f

Note: See TracTickets for help on using tickets.