|
SOLUTIONS
|
Search for all pages containing URLFetchAsynchronous
BUILT-IN MATHEMATICA SYMBOL
URLFetchAsynchronous
URLFetchAsynchronous["url", eventFunction]
performs a connection in the background, calling the eventFunction when an event is raised.
Details and OptionsDetails and Options
- Types of events that may be raised:
-
"data" returns a list of bytes and indicates that the connection has completed "progress" returns information about the current connect of the form
"error" indicates that an error occurred while attempting to connect to a URL "headers" headers received from the web server "cookies" a list of all known cookies "statuscode" the status code returned by the server - The following options can be given:
-
"Method" "GET" method used when connecting to an HTTP server "Parameters" {} parameters to be sent to the HTTP server "VerifyPeer" True verify the authenticity of a remote server using SSL certificates "Username" "" connect to an HTTP server with a certain username "Password" "" connect to an HTTP server with a certain password "UserAgent" Automatic change the user agent sent to an HTTP server "Cookies" Automatic cookie management, Automatic, or may be handled manually by passing a list of cookies "StoreCookies" True if True, cookies will be stored in a global cookie share "Headers" {} headers to be manually sent to the HTTP server "BodyData" "" contents of message body to be sent to the server "MultipartData" {} to upload multipart data, each part must be of the form
, where {bytes} is a list of bytes"Progress" False if True,
event will be raised"Transfer" Automatic if Automatic, the
event returns once, and returns all the data downloaded; if
, the
event is raised multiple times with the data downloaded since the last event was raised"UserData" None any expression passed to this option will be stored for use of the AsynchronousTaskObject inside the event function; the data can be found by checking the options of AsynchronousTaskObject passed to the event function "ReadTimeout" 0 the maximum allowed time in seconds to download or upload data to the server "ConnectTimeout" 0 the maximum allowed time in seconds to connect to the server - When an event is raised, the event function passed to URLFetchAsynchronous will be executed. The event functions will be passed three arguments, the AsynchronousTaskObject, the event name, and the data received from the event. Event functions are the only method for handling data received from URLFetchAsynchronous.
New in 9
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »






