Open topic with navigation

# 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")

© 2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm