HTTP/Form - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : HTTP/Form

HTTP

  

Form

  

Send form data to a URL

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

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.

Options

• 

headers=list

list of header values; duplicate values will be combined into a single comma-separated list.

• 

method= a string

either "GET" or "POST". Specify whether to submit form data as a get or post request. The default is POST.

• 

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.

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

> 

status,data,headers≔HTTP:-Form⁡http://www.ssa.gov/cgi-bin/popularnames.cgi,year=1990,top=20,number=n:

> 

HTTP:-Code⁡status

OK

(1)
> 

type⁡data,string

true

(2)
> 

data1..39

<html> <head><title>Popular Baby Names<

(3)
> 

type⁡headers&comma;table

true

(4)
> 

headersContent-Type

text/html; charset=UTF-8

(5)
> 

status,data,headers≔HTTP:-Form⁡http://www.wunderground.com//history/airport/CYKF/2010/05/13/DailyHistory.html&comma;HideSpecis=0&comma;format=0&comma;method=GET&colon;

> 

HTTP:-Code⁡status

OK

(6)
> 

type⁡data&comma;string

true

(7)
> 

data1..160

TimeEDT,TemperatureC,Dew PointC,Humidity,Sea Level PressurehPa,VisibilityKm,Wind Direction,Wind SpeedKm/h,Gust SpeedKm/h,Precipitationmm,Events,Conditions,Wind

(8)
> 

type⁡headers&comma;table

true

(9)
> 

headersConnection

close

(10)
> 

status,data,headers≔HTTP:-Form⁡http://chart.apis.google.com/chart&comma;chs=100x100&comma;cht=qr&comma;chl=http://mapleprimes.com/&colon;

> 

HTTP:-Code⁡status

OK

(11)
> 

type⁡data&comma;rtable

true

(12)
> 

data

−119&comma;80&comma;78&comma;71&comma;13&comma;10&comma;26&comma;10&comma;0&comma;0&comma;0&comma;13&comma;73&comma;72&comma;68&comma;82&comma;0&comma;0&comma;0&comma;100&comma;0&comma;0&comma;0&comma;100&comma;8&comma;2&comma;0&comma;0&comma;0&comma;−1&comma;−128&comma;2&comma;3&comma;0&comma;0&comma;0&comma;6&comma;98&comma;75&comma;71&comma;68&comma;0&comma;−1&comma;0&comma;−1&comma;0&comma;−1&comma;−96&comma;−67&comma;−89&comma;−109&comma;0&comma;0&comma;2&comma;61&comma;73&comma;68&comma;65&comma;84&comma;120&comma;−100&comma;−19&comma;−100&comma;−63&comma;110&comma;−60&comma;48&comma;8&comma;5&comma;−101&comma;−86&comma;−1&comma;−1&comma;−53&comma;−37&comma;91&comma;−10&comma;−32&comma;21&comma;98&comma;0&comma;59&comma;−86&comma;58&comma;115&comma;109&comma;−20&comma;68&comma;79&comma;−68&comma;26&comma;108&comma;−68&comma;−41&comma;−21&comma;−11&comma;−6&comma;−110&comma;28&comma;−33&comma;…&comma;⋯ 548 Array entries not shown

(13)

Compatibility

• 

The HTTP[Form] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

HTTP

HTTP[Code]

HTTP[Post]