submits the specified URL to be executed asynchronously.


submits the specified URL, adding elements with names parami and values vali.


submits the cloud object obj.


submits the specified HTTP request.

Details and Options

  • In URLSubmit[url], url can be a string, a URL object, or a cloud object.
  • URLSubmit[assoc] is equivalent to URLSubmit[HTTPRequest[assoc]].
  • URLSubmit returns a symbolic representation of an asynchronous task.
  • For simple forms of the vali such as numbers and short strings, URLSubmit performs a GET request, with the parami specifying parameters in the query string. In other cases, it performs a POST request.
  • The vali can be strings or numbers, or the following special forms:
  • None,Null,Missing""
    {e1,e2,}e1, e2,
    imagean image in default format
    ExportForm[expr,form]any expression, exported in the specified form
    File["file"]the contents of a file
  • URLSubmit takes the same options as URLRead, together with:
  • HandlerFunctions<||>how to handle events generated
    HandlerFunctionsKeysAutomaticwhat parameters to supply to handler functions
  • For URLSubmit, the default setting for the option Interactive is False.
  • During the asynchronous execution of URLSubmit, the following events can be generated:
  • "BodyReceived"response body successfully received
    "BodyChunkReceived"chunk of body received
    "ConnectionFailed"URL connection failed
    "CookiesReceived"cookies successfully received
    "HeadersReceived"headers successfully received
    "TaskFinished"task finished
    "TaskStatusChanged"status of task changes
  • With the specification HandlerFunctions-><|,"eventi"->fi,|>, fi[assoc] is evaluated whenever eventi is generated. The elements of assoc have keys specified by the setting for HandlerFunctionsKeys.
  • Possible keys specified by HandlerFunctionsKeys include:
  • "Body"body of the response as a string
    "BodyByteArray"raw body of the response as a byte array
    "BodyBytes"raw body of the response as a list of byte values
    "BodyChunk"chunk of the body as a string
    "BodyChunkByteArray"chunk of the body as a byte array
    "BodyChunkBytes"chunk of the body as a list of byte values
    "Headers"list of headers received in the response
    "Cookies"list of cookies received in the response
    "ContentType"content type header
    "StatusCode"status code returned by the server
    "StatusCodeDescription"plain text description of status code
    "ByteCountDownloaded"number of bytes downloaded so far
    "ByteCountTotal"total number of bytes to download
    "FractionComplete"fraction of total downloaded so far
    "Task"the task object generated by URLSubmit
    "TaskStatus""Running", "Suspended", "Finished"
    "EventName"the name of the event being handled
  • Values that have not yet been received are given as Missing["NotAvailable"].
  • If the appropriate headers are not available at the URL being read, "ByteCountTotal" and "FractionComplete" will be given as Missing["NotAvailable"].


open all close all

Basic Examples  (5)

Send a request and get notified when the task finishes:

Click for copyable input

Send a request with parameters:

Click for copyable input

Get the status code and content type:

Click for copyable input

Build a URL from components:

Click for copyable input

More complex requests can use HTTPRequest:

Click for copyable input

Scope  (5)

Options  (1)

Properties & Relations  (2)

Introduced in 2016
Updated in 2017