libURLLastHTTPHeaders

returns the value of the httpHeaders property used for the previous HTTP request.

# Metadata

Platforms: desktop, server OS: mac, windows, linux, web Introduced: 1.1.1 Security: network

# Syntax

libURLLastHTTPHeaders()

# Examples

put libURLLastHTTPHeaders() into headersToAnalyze

if probReq is among the lines of libURLLastHTTPHeaders() then tryAgain

# Description

Use the libURLLastHTTPHeaders function to debug problems with HTTP transfers, or to report errors to advanced users.

You can set the httpHeaders property to send custom headers in addition to the default headers. Whenever LiveCode contacts a web server to download a page (with the load command or by using a URL in an expression) or to post data (with the post command), the contents of the httpHeaders property is sent to the web server. The libURLLastHTTPHeaders function returns the last set of custom headers used.

>*Important:* The libURLLastHTTPHeaders function is part of the > Internet library. To ensure that the function works in a > standalone application, you must include this > LiveCode custom library when you create your > standalone application. In the Inclusions pane of the > Standalone Application Settings window, make sure the "Internet" > script library is selected.

# Tags

# See