diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-02-06 16:07:10 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-02-06 16:07:10 -0800 |
| commit | 51bebe0c6f137d293dbb6f1194ad3f6fca5b79e9 (patch) | |
| tree | f320ab2eec336cb781aa3774260e99a35d97e991 /docs/nng_http_handler_alloc.adoc | |
| parent | 3b33f6878ee628da22fd4451f248c036aae231ed (diff) | |
| download | nng-51bebe0c6f137d293dbb6f1194ad3f6fca5b79e9.tar.gz nng-51bebe0c6f137d293dbb6f1194ad3f6fca5b79e9.tar.bz2 nng-51bebe0c6f137d293dbb6f1194ad3f6fca5b79e9.zip | |
Document HTTP server API completely.
Diffstat (limited to 'docs/nng_http_handler_alloc.adoc')
| -rw-r--r-- | docs/nng_http_handler_alloc.adoc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/nng_http_handler_alloc.adoc b/docs/nng_http_handler_alloc.adoc index cde5b052..45ba7aff 100644 --- a/docs/nng_http_handler_alloc.adoc +++ b/docs/nng_http_handler_alloc.adoc @@ -41,7 +41,13 @@ by _hp_. Every handler has a Request-URI to which it refers, which is determined by the _path_ argument. Only the path component of the Request URI is -considered. +considered when determining whether the handler should be called. + +Additionally each handler has a method it is registered to handle +(the default is "GET", see +<<nng_http_handler_set_method#,nng_http_handler_set_method(3)), and +optionally a 'Host' header it can be matched against (see +<<nng_http_handler_set_host#,nng_http_handler_set_host(3)). In some cases, a handler may reference a logical tree rather (directory) rather than just a single element. @@ -113,9 +119,9 @@ This function returns 0 on success, and non-zero otherwise. == ERRORS -`NNG_ENOMEM`:: Insufficient free memory exists to allocate a message. -`NNG_ENOTSUP`:: HTTP support not configured. `NNG_EINVAL`:: An invalid _path_ was specified. +`NNG_ENOMEM`:: Insufficient free memory exists to allocate a message. +`NNG_ENOTSUP`:: No support for HTTP in the library. == SEE ALSO |
