Answer Server 12.13

# LuaHttpRequest:new

The constructor for a `LuaHttpRequest` object (creates a new `LuaHttpRequest`).

## Syntax

    LuaHttpRequest:new( config, section )

## Arguments

Argument | Description
--- | ---
`config` | (LuaConfig) The LuaConfig object that contains the settings for sending the HTTP request. To obtain a LuaConfig object, see the function get_config or LuaConfig:new.
`section` | (string) The name of the configuration section from which to read the settings.

## Returns

(LuaHttpRequest). The new `LuaHttpRequest` object.

## Example

The following example creates a new `LuaHttpRequest` object by reading configuration settings from a string that is defined in the script:

    local config_string = [===[
    [HTTP]
    ProxyHost=proxy.domain.com
    ProxyPort=8080
    SSLMethod=NEGOTIATE
    ]===]

    local config = LuaConfig:new(config_string)
    local request = LuaHttpRequest:new(config, "HTTP")

© Copyright 2016-2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Answer Server 12.13

Topic Title: LuaHttpRequest:new