HTTP/Form - Help

HTTP[Form] - Send form data to a URL

 Calling Sequence Form(URI, formdata)

Parameters

 URI - host, port, and URL path of the form http://host:port/path/to/file; the uniform resource identifier formdata - content of the form given as a list of string=string values.

Description

 • Form is a higher level command that accepts the form data as a list of equations, and then properly formats it as an HTTP request.

Examples

 > $\mathrm{status},\mathrm{data},\mathrm{headers}:=\mathrm{HTTP}:-\mathrm{Form}\left("http://www.ssa.gov/cgi-bin/popularnames.cgi",\left["year"=1990,"top"=20,"number"="n"\right]\right):$
 > $\mathrm{HTTP}:-\mathrm{Code}\left(\mathrm{status}\right)$
 ${"OK"}$ (1)
 > $\mathrm{type}\left(\mathrm{data},'\mathrm{string}'\right)$
 ${\mathrm{true}}$ (2)
 > ${\mathrm{data}}_{1..39}$
 ${" Popular Baby Names<"}$ (3)
 > $\mathrm{type}\left(\mathrm{headers},'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (4)
 > ${\mathrm{headers}}_{"Content-Type"}$
 ${"text/html"}$ (5)
 > $\mathrm{status},\mathrm{data},\mathrm{headers}:=\mathrm{HTTP}:-\mathrm{Form}\left("http://www.wunderground.com//history/airport/CYKF/2010/05/13/DailyHistory.html",\left[\mathrm{HideSpecis}=0,\mathrm{format}=0\right],\mathrm{method}="GET"\right):$
 > $\mathrm{HTTP}:-\mathrm{Code}\left(\mathrm{status}\right)$
 ${"OK"}$ (6)
 > $\mathrm{type}\left(\mathrm{data},'\mathrm{string}'\right)$
 ${\mathrm{true}}$ (7)
 > ${\mathrm{data}}_{1..160}$
 ${"TimeEDT,TemperatureC,Dew PointC,Humidity,Sea Level PressurehPa,VisibilityKm,Wind Direction,Wind SpeedKm/h,Gust SpeedKm/h,Precipitationmm,Events,Conditions,WindD"}$ (8)
 > $\mathrm{type}\left(\mathrm{headers},'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (9)
 > ${\mathrm{headers}}_{"Connection"}$
 ${"close"}$ (10)
 > $\mathrm{status},\mathrm{data},\mathrm{headers}:=\mathrm{HTTP}:-\mathrm{Form}\left("http://chart.apis.google.com/chart",\left[\mathrm{chs}="100x100",\mathrm{cht}="qr",\mathrm{chl}="http://mapleprimes.com/"\right]\right):$
 > $\mathrm{HTTP}:-\mathrm{Code}\left(\mathrm{status}\right)$
 ${"OK"}$ (11)
 > $\mathrm{type}\left(\mathrm{data},'\mathrm{rtable}'\right)$
 ${\mathrm{true}}$ (12)
 > $\mathrm{data}$
 $\left[\begin{array}{c}{\mathrm{1 .. 648}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{integer}}}_{{1}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{Fortran_order}}\end{array}\right]$ (13)