Skip to content

Commit

Permalink
feat(FEC-11091): add support for XMLHttpRequest.withCredentials in re…
Browse files Browse the repository at this point in the history
…quest filter (#438)
  • Loading branch information
Dan Ziv committed Apr 26, 2021
1 parent b09980a commit 5ccdc1a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/request-response-manipulation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Request and Response Manipulation

An application may have to manipulate the player requests and responses to adjust them to its own specific environment (e.g. for DRM license wrapping).
An application may have to manipulate the player requests and responses to adjust them to its own specific environment (e.g. for DRM license wrapping).
To achieve this ability Kaltura-player exposes a dedicated configuration which allows the application to pass a request filter to get the request object just before it is sent to the server, and a response filter to get the response object just after it returned from the server.

There are 3 types of requests the application can manipulate: DRM license, manifest and segments fetching.
Expand All @@ -9,17 +9,18 @@ There are 3 types of requests the application can manipulate: DRM license, manif

Each request object contains the followings:

`url: string` - The request URL.
`body: string || ArrayBuffer` - The request body, the type depends on the request type.
`url: string` - The request URL.
`body: string || ArrayBuffer` - The request body, the type depends on the request type.
`headers: Object` - A mapping of headers of the request. e.g.: {'HEADER': 'VALUE'}.
`withCredentials: boolean` - Make requests with credentials. This will allow cookies in cross-site requests.

## Response Params

Each response object contains the followings:

`url: string` - The URI which was loaded.
`originalUrl: string` - The original URI before any redirects.
`data: ArrayBuffer` - The body of the response.
`url: string` - The URI which was loaded.
`originalUrl: string` - The original URI before any redirects.
`data: ArrayBuffer` - The body of the response.
`headers: Object` - A mapping of headers of the response. e.g.: {'HEADER': 'VALUE'}.

##
Expand Down

0 comments on commit 5ccdc1a

Please sign in to comment.