NaviServer - programmable web server

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_httppost(n) 4.99.19 naviserver "NaviServer Built-in Commands"

Name

ns_httppost - Open an HTTP connection and posts data to the server

Table Of Contents

Synopsis

Description

This command is deprecated; use ns_http instead.

ns_httppost is a wrapper around ns_httpopen to send data using HTTP POST method.

COMMANDS

ns_httppost url ?rqset? ?qsset? ?type? ?timeout?

url Url where to send data.

rqset This is ns_set with headers, if none specified, default minimum number of HTTP headers will be provided.

qsset This is ns_set with form data, key values pair which will be formatted into query format as if browser sends it.

type Content type, default is application/x-www-form-urlencoded which submitted form format.

timeout Timeout for opening the connection (the default is 30 seconds) or retrieving data.

EXAMPLES

set form [ns_set new]
ns_set put $data Name John
ns_set put $data Action Add
set page [ns_httppost http://www.aolserver.com] "" $data

See Also

ns_http, ns_httpget, ns_httpopen, ns_httptime

Keywords

http-client