# 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 2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm