-
Notifications
You must be signed in to change notification settings - Fork 8
HTTP
lainz edited this page Aug 18, 2016
·
1 revision
#HTTP
- If you need to specify a port do it in the URL adding ":" and the port number.
Example:
my_url = "http://www.example.com:80/"
- If you need to specify a proxy do it from your operating system settings.
#HTTP.Download Downloads a file from an URL.
Parameters: URL, Filename, UserName, Password.
HTTP.Download("http://www.example.com/file.txt", "C:\\temp\\file.txt", "", "")
#HTTP.DownloadSecure Is an alias to HTTP.Download, both can work with HTTP and HTTPS websites.
#HTTP.GetFileSize Get the size of a file stored in a website.
Parameters: URL, UserName, Password.
result_bytes = HTTP.GetFileSize("http://www.example.com/file.txt", "", "")
#HTTP.GetFileSizeSecure Is an alias to HTTP.GetFileSize, both can work with HTTP and HTTPS websites.
#HTTP.Submit Sends data to a website and get the result as string.
Parameters: URL, TableData, Method, UserName, Password.
my_data = {color="Red", year="2016"}
result_string = HTTP.Submit("http://www.example.com/", my_data, 1, "", "")
Method can be:
- 1: GET
- 0: POST
#HTTP.SubmitSecure Is an alias to HTTP.Submit, both can work with HTTP and HTTPS websites.