Answer Server 26.3
Answer Server Help

# set_headers

The `set_headers` method replaces all headers in the HTTP request with new headers.

To add a header without changing existing headers, use the method set_header.

## Syntax

    set_headers( headers )

## Arguments

Argument | Description
--- | ---
`headers` | (table) The new HTTP headers to add to the request. The table must map header names to values.

## Example

    request:set_headers( {X-EXAMPLE="Example", X-ANOTHER="ANOTHER"} )

Copyright 2016-2026 Open Text
Version 26.3 | Last updated July 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Answer Server 26.3

Topic Title: set_headers