Hi Leandro,
I have tried below two options and still getting NULL.
- var connection = apim.getvariable('request.headers.connection');
- var tencoding = apim.getvariable('request.headers.transfer-encoding');
Already we are iterating through the headers (code snippet below) and it WORKS, but CANNOT get the Connection and Transfer-Encoding header.
var request_headers = apim.getvariable('request.headers'); for (var req_header in request_headers) { header_data[req_header] = request_headers[req_header]; }
| request.headers.name |
The value of the original named header of the HTTP request, or the value of the current named header of the root part of a multipart request. The name segment is case-insensitive. |
Read-only |
I have tried both Case Sensitive and Insensitive for name segment and still did not work.
Curl command used to send traffic to DP.
curl -vv -k
https://172.16.40.89/porg/sb/api1/ -H "Host: 172.16.40.186:9999" -H "Connection: close" -H "Transfer-Encoding: Chunked" -d "{}"
------------------------------
Anoop K
------------------------------
Original Message:
Sent: Mon February 24, 2020 01:14 PM
From: Leandro Takeda
Subject: Issue in accessing Connection and Transfer-Encoding headers from Gatewayscript
Are you sure you can run a for under request_headers like you are doing?
Why you don´t do:
apim.getvariable('request.headers.Connection')?
------------------------------
Leandro Takeda
------------------------------