Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

CURL.SetOptionFollowLocation

Enables or disables following locations.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 2.5 Yes Yes Yes Yes Yes

MBS( "CURL.SetOptionFollowLocation"; Handle; Value )

Parameters

Parameter Description Example value
Handle The CURL session handle. $curl
Value Whether to follow locations. 1

Result

Returns "OK" on success.

Description

Enables or disables following locations.
A parameter set to 1 tells the library to follow any Location: header that the server sends as part of an HTTP header.

This means that the library will re-send the same request on the new location and follow new Location: headers all the way until no more such headers are returned. CURL.SetOptionMaxRedirs can be used to limit the number of redirects libcurl will follow.

CURL can limit what protocols it will automatically follow. The accepted protocols are set with CURL.SetOptionRedirProtocols and it excludes the FILE protocol by default.

Examples

Allow up to three redirects:

Set Variable [$result; Value: MBS("CURL.SetOptionFollowLocation"; $curl; 1)]
Set Variable [$result; Value: MBS("CURL.SetOptionMaxRedirs"; $curl; 3)]

See also

Example Databases


CURL.SetOptionFileTime   -   CURL.SetOptionForbitReuse

Feedback: Report problem or ask question.




Links
MBS Xojo blog