diff options
Diffstat (limited to 'doc/http.html')
| -rw-r--r-- | doc/http.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/http.html b/doc/http.html index a60ed25..992ac7a 100644 --- a/doc/http.html +++ b/doc/http.html | |||
| @@ -188,7 +188,7 @@ function from automatically following 301 or 302 server redirect messages; | |||
| 188 | In case of failure, the function returns <tt><b>nil</b></tt> followed by an | 188 | In case of failure, the function returns <tt><b>nil</b></tt> followed by an |
| 189 | error message. If successful, the simple form returns the response | 189 | error message. If successful, the simple form returns the response |
| 190 | body as a string, followed by the response status code, the response | 190 | body as a string, followed by the response status code, the response |
| 191 | headers and the response status line. The complex function returns the same | 191 | headers and the response status line. The generic function returns the same |
| 192 | information, except the first return value is just the number 1 (the body | 192 | information, except the first return value is just the number 1 (the body |
| 193 | goes to the <tt>sink</tt>). | 193 | goes to the <tt>sink</tt>). |
| 194 | </p> | 194 | </p> |
| @@ -259,6 +259,14 @@ r, c, h = http.request { | |||
| 259 | -- } | 259 | -- } |
| 260 | </pre> | 260 | </pre> |
| 261 | 261 | ||
| 262 | <p class=note id=post> | ||
| 263 | Note: When sending a POST request, simple interface adds a | ||
| 264 | "<tt>Content-type: application/x-www-form-urlencoded</tt>" | ||
| 265 | header to the request. This is the type used by | ||
| 266 | HTML forms. If you need another type, use the generic | ||
| 267 | interface. | ||
| 268 | </p> | ||
| 269 | |||
| 262 | <p class=note id=authentication> | 270 | <p class=note id=authentication> |
| 263 | Note: Some URLs are protected by their | 271 | Note: Some URLs are protected by their |
| 264 | servers from anonymous download. For those URLs, the server must receive | 272 | servers from anonymous download. For those URLs, the server must receive |
