URLFetch
URLFetch is being phased out in favor of URLRead and URLExecute, which were introduced experimentally in Version 11.
URLFetch[url]
returns the contents of a URL as a string.
URLFetch[url,elements]
returns the specified elements from a URL.
Details and Options
- Types of elements supported:
- The following forms of element specifications can be given:
-
elem return a single element {elem1,elem2,…} return several elements {"Rules",{elem1,elem2,…}} return several elements as a list of rules "Rules" return all possible elements as a list of rules All return all possible elements as a list - The following options can be given:
-
Method "GET" method to use for request "Parameters" {} parameters to be sent for the request "Body" "" contents of message body to be sent "MultipartElements" {} list of multipart data elements to send "Username" "" username to use for the request "Password" "" password to use for the request "Headers" {} headers to be manually sent to the HTTP server "Cookies" Automatic cookies to pass to the server "StoreCookies" True whether to store received cookies "VerifyPeer" True verify authenticity using SSL certificates "UserAgent" Automatic user agent string to send "ReadTimeout" 0 time to allow for uploading or downloading data "ConnectTimeout" 0 time to allow for connecting to the server "FollowRedirects" True whether to follow redirects - Allowed times are by default given in seconds.
- Multipart elements must be of the form {"name","mimetype"}->val, where val is a string or a list of bytes.
Examples
open allclose all
Wolfram Research (2012), URLFetch, Wolfram Language function, https://reference.wolfram.com/language/ref/URLFetch.html.
Text
Wolfram Research (2012), URLFetch, Wolfram Language function, https://reference.wolfram.com/language/ref/URLFetch.html.
CMS
Wolfram Language. 2012. "URLFetch." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/URLFetch.html.
APA
Wolfram Language. (2012). URLFetch. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/URLFetch.html