ghttpSaveEx

GameSpy SDK

ghttpSaveEx

Make a HTTP GET request and save the response to disk.

GHTTPRequest ghttpSaveEx(
const gsi_char * URL,
const gsi_char * filename,
const gsi_char * headers,
GHTTPPost post,
GHTTPBool throttle,
GHTTPBool blocking,
ghttpProgressCallback progressCallback,
ghttpCompletedCallback completedCallback,
void * param );
RoutineRequired HeaderDistribution
ghttpSaveEx<ghttp.h>SDKZIP

Return Value

If less than 0, the request failed and this is a GHTTPRequestError value. Otherwise it identifies the request.

Parameters

URL
[in] URL
filename
[in] The path and name to store the file as locally.
headers
[in] Optional headers to pass with the request. Can be NULL or "".
post
[in] Optional data to be posted. Can be NULL.
throttle
[in] If true, throttle this connection's download speed.
blocking
[in] If true, this call doesn't return until the file has been received.
progressCallback
[in] Called periodically with progress updates. Can be NULL.
completedCallback
[in] Called when the file has been received. Can be NULL.
param
[in] Optional free-format user data for use by the callback

Remarks

This function is used to download the contents of a web page directly to disk. The application supplies the path and filename at which to save the response.
Use ghttpSave for a simpler version of this function.