BE_HTTP_GET_File

BE_HTTP_GET_File ( url {; path ; username ; password } )

Does a http GET function and returns the results as a file that is saved to disk.

This uses the curl library so output will be similar to that. This is used in conjunction with the BE_HTTP_SetCustomHeader function to set custom headers in advance and the BE_HTTP_ResponseCode and BE_HTTP_ResponseHeaders functions to get the result values after the GET is complete.

Version : 1.2
3.3.0 Renamed to BE_HTTP_GET_File from BE_SaveURLToFile 

Parameters : 
url : the url to retrieve. 
path : The path to save the file to. 
username ( optional ) : The username if the url requires authentication. 
password ( optional ) : The password if the url requires authentication.

Result : The file is saved to disk at path, and the result is empty for success or ? on error.  More detail about errors can be got from BE_HTTP_ResponseCode, BE_HTTP_ResponseHeaders, and BE_CurlTrace.

Check for errors using the BE_GetLastError function and use https://curl.haxx.se/libcurl/c/libcurl-errors.html for error details.

Still need help? Contact Us Contact Us