HTTP
Post
Post data to a URL using HTTP POST and retrieve the result
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Post(URI, content, options)
URI
-
host, port, and URL path of the form http://host:port/path/to/file; the uniform resource identifier
content
content of the HTTP request
headers=list
list of header values; duplicate values will be combined into a single comma-separated list.
timeout=posint
the number of seconds to wait for data before timing out.
forcemode=name
either text or binary this forces the transfer to be done in the given mode regardless of the Content-Type reported by the server.
norevoke=truefalse
When true, disables certificate revocation checks for those SSL backends where such behavior is present. This option is only supported for on Windows and has limitations.
Post is an extension of Get. In addition to being able to data in the Request-URI, Post is also able to send other data to the server in the content argument. This command is generally used to implement the sending of data via an HTML form.
Post returns a sequence (code, content, headers) with code set to the return code sent by the server, content containing the body of the server response, and headers as a table.
status,data,headers≔HTTP:-Post⁡https://www.ssa.gov/cgi-bin/popularnames.cgi,year=1990&top=20&number=n,headers=Content-Type=application/x-www-form-urlencoded,timeout=100:
HTTP:-Code⁡status
OK
type⁡data,string
true
data1..39
<html> <head><title>Popular Baby Names<
type⁡headers,table
headersContent-Type
text/html; charset=UTF-8
The HTTP[Post] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
HTTP[Code]
HTTP[Get]
Download Help Document