Open topic with navigation

# set_config

The `set_config` method specifies settings to use for sending the HTTP request (in the form of a section from a configuration file). For example, you can specify the proxy server to use by setting the parameters `ProxyHost` and `ProxyPort`, or specify the SSL version to use by setting `SSLMethod`.

## Syntax

    set_config( 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.

## Example

The following example creates a new `LuaConfig` object from a string. Usually you would read the configuration settings from the configuration file using the function get_config. It then uses the `LuaConfig` object to provide settings for a `LuaHttpRequest` named `request`.

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

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

© Copyright 2018 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 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