Tech Tip: 4D.HTTPRequest response contains 2 types of headers
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: September 25, 2023
When using 4D.HTTPRequest, note that the headers in the response have been slightly updated. Starting in v19 R8, there are 2 types of response header properties: “headers” and “rawHeaders”. The “rawHeaders” property contains the header names with original letter casing, while the “headers” property contains header names in all lowercase (to comply with HTTP RFC standards). For example, a typical “rawHeaders” object may have property names such as “Access-Control-Allow-Origin” and “Date”, versus “headers” object property names like “access-control-allow-origin” and “date”. Any existing code that uses “headers” names may need to be modified to match letter casing, or alternatively switch to using “rawHeaders”.