ILXTransaction¶
new ILXTransaction(stream)
- Since:
- BIP-IP TMOS 13.0
Parameters:
Name | Type | Description |
---|---|---|
stream
|
ILXTransaction~reque st | ILXTransaction~respo nse |
Listens to Events:
- ILXStream#event:responseStart
- ILXStream#event:responseComplete
- ILXStream#event:requestStart
- ILXStream#event:requestComplete
Example:
plugin.on('connect', function(flow) {
flow.client.on('requestStart', function(request) {
request.setHeader('X-F5-ilxTest', 'successful'); // <----- ILXTransaction request object
});
flow.server.on('responseComplete', function(response) {
response.complete(); // <-------------- ILXTransaction response object
});
});
Methods¶
complete()¶
removeHeader(headerName)¶
Parameters:¶
Name | Type | Description |
---|---|---|
headerName
|
string | The name of a header to remove from the transaction |
replaceBody()¶
Discard all data received from the client (or server). The plugin can replace the body using ILXFlow.server.write (or ILXFlow.client.write).This can be called after ` <ILXStream.html#event:requestStart>`__
ILXStream#event:requestStart
or ` <ILXStream.html#event:responseStart>`__
ILXStream#event:responseStart
and before ` <#complete>`__
ILXTransaction.complete()
.
respond()¶
(request ILXTransaction object only) Tells the plugin that it will respond directly to the client. The request will be discarded and not sent to the server. When the requestComplete event is received the plugin may add headers and a body to the response. To send the response to the client the plugin must call ` <#complete>`__
ILXTransaction.complete()
.
Type Definitions¶
request¶
Type:¶
- object
Properties:¶
Name | Type | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params
|
object | Propertie
1
|
response¶
Type:¶
- object
Properties:¶
Name | Type | Description | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params
|
object | Propertie
3
|
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.