Share this page

# web_revert_auto_header

Stops scripts from adding a specific header to subsequent HTTP requests.

## C Language

    int web_revert_auto_header( const char *Header);

Header Functions

## Java Language

    int object.web_revert_auto_header( String Header) ;

Header Functions | Java Syntax

Argument | Description
--- | ---
object | An expression evaluating to an object of type WebApi. Usually web for Java. See also Function and Constant Prefixes.
Header | The name of the user–defined header. Examples: Content–Type, If–Modified–Since, Referer, and User–Agent

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

## Parameterization

Parameterization is not applicable to this function.

## General Information

The web_revert_auto_header function is a service function that stops adding a specific user–defined header to subsequent HTTP requests. This function cancels the automatic header generation for the specified header, initiated by web_add_auto_header. It continues to generate Implicit Headers, as if no web_add_auto_header or web_remove_auto_header function was ever issued.

The web_revert_auto_header is equivalent to the web_remove_auto_header function with the `ImplicitGen` option set to Yes.

This function is supported for all web scripts.

## C Example

The following example stops scripts from adding the User-Agent header to subsequent HTTP requests. It continues to generate implicit headers.

    web_revert_auto_header("User-Agent");

## Java Example

The following example stops scripts from adding the User-Agent header to subsequent HTTP requests. It continues to generate implicit headers.

    web.revert_auto_header("User-Agent");

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: