# SendHTTPFile

## Description

Send a file to the server specified in SetHTTPHost, for example if requesting http: www.thegamecreators.com/index.php szServerFile should be "index.php". Also allows you to send POST data to the server which can include variables or file data, e.g. "myvar=5&var2=test". This command returns immediately and waits for the server to reply in the background. You can check the status of the reply with GetHTTPResponseReady and when it is ready retrieve the response with GetHTTPResponse. You can check the progress of the upload with GetHTTPFileProgress.
Does not work when exported to HTML5

## Definition

integer SendHTTPFile( iHTTP, szServerFile, szPostData, szLocalFile )

int agk::SendHTTPFile( UINT iHTTP, const char *szServerFile, const char *szPostData, const char *szLocalFile )

## Parameters

- iHTTP - The ID of the connection to use.
- szServerFile - The file to request from the server, include everything after the domain part of the URL.
- szPostData - The raw post data to send to the server, note that & and = are special characters that separate variables.
- szLocalFile - The filename of the file you want to send to the server.