diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/api/http.md | 8 | ||||
| -rw-r--r-- | docs/ref/xref.md | 72 |
2 files changed, 76 insertions, 4 deletions
diff --git a/docs/ref/api/http.md b/docs/ref/api/http.md index b9ecca83..91a3d8d6 100644 --- a/docs/ref/api/http.md +++ b/docs/ref/api/http.md @@ -255,13 +255,13 @@ void nng_http_set_body(nng_http_conn *conn, void *data, size_t size); void nng_http_copy_body(nng_http_conn *conn, const void *data, size_t size); ``` -The {{i:`nng_http_set_data`}} function sets the outgoing body content to _data_, +The {{i:`nng_http_set_body`}} function sets the outgoing body content to _data_, which must be _size_ bytes long. The caller must ensure that _data_ remains valid for the duration of the transaction. -The {{i:`nng_http_copy_data`}} function makes a copy of _data_, which +The {{i:`nng_http_copy_body`}} function makes a copy of _data_, which will be freed automatically when the transaction is finished, but otherwise -behaves like `nng_http_set_data`. +behaves like `nng_http_set_body`. On client _conn_ objects, these functions update the request object, but on server _conn_ objects, they update the response object. @@ -489,7 +489,7 @@ the HTTP request associated with _conn_. The entire request is sent, including headers, and if present, the request body data. (The request body can be set with -[`nng_http_set_data`] or [`nng_http_copy_data`].) +[`nng_http_set_body`] or [`nng_http_copy_body`].) This function returns immediately, with no return value. Completion of the operation is signaled via the _aio_, and the final result diff --git a/docs/ref/xref.md b/docs/ref/xref.md index e3b57585..57964123 100644 --- a/docs/ref/xref.md +++ b/docs/ref/xref.md @@ -274,6 +274,7 @@ [`nng_http_set_uri`]: /api/http.md#http-uri [`nng_http_get_uri`]: /api/http.md#http-uri [`nng_http_get_reason`]: /api/http.md#http-status +[`nng_http_status`]: /api/http.md#http-status [`nng_http_get_status`]: /api/http.md#http-status [`nng_http_set_status`]: /api/http.md#http-status [`nng_http_hijack`]: /api/http.md#hijacking-connections @@ -294,9 +295,80 @@ [`nng_http_read_all`]: /api/http.md#direct-read-and-write [`nng_http_write`]: /api/http.md#direct-read-and-write [`nng_http_write_all`]: /api/http.md#direct-read-and-write +[`nng_http_handler`]: /api/http.md#handlers +[`nng_http_handler_alloc`]: /api/http.md#handlers +[`nng_http_write_response`]: /api/http.md#sending-the-response-explicitly +[`nng_http_handler_collect_body`]: /api/http.md#collecting-request-body +[`nng_http_handler_set_host`]: /api/http.md#filtering-byt-host +[`nng_http_handler_set_method`]: /api/http.md#setting-the-method +[`nng_http_handler_set_data`]: /api/http.md#setting-the-callback-argument + +<!-- HTTP Status --> + +[`NNG_HTTP_STATUS_CONTINUE`]: /api/http.md#NNG_HTTP_STATUS_CONTINUE +[`NNG_HTTP_STATUS_SWITCHING`]: /api/http.md#NNG_HTTP_STATUS_SWITCHING +[`NNG_HTTP_STATUS_PROCESSING`]: /api/http.md#NNG_HTTP_STATUS_PROCESSING +[`NNG_HTTP_STATUS_OK`]: /api/http.md#NNG_HTTP_STATUS_OK +[`NNG_HTTP_STATUS_CREATED`]: /api/http.md#NNG_HTTP_STATUS_CREATED +[`NNG_HTTP_STATUS_ACCEPTED`]: /api/http.md#NNG_HTTP_STATUS_ACCEPTED +[`NNG_HTTP_STATUS_NOT_AUTHORITATIVE`]: /api/http.md#NNG_HTTP_STATUS_NOT_AUTHORITATIVE +[`NNG_HTTP_STATUS_NO_CONTENT`]: /api/http.md#NNG_HTTP_STATUS_NO_CONTENT +[`NNG_HTTP_STATUS_RESET_CONTENT`]: /api/http.md#NNG_HTTP_STATUS_RESET_CONTENT +[`NNG_HTTP_STATUS_PARTIAL_CONTENT`]: /api/http.md#NNG_HTTP_STATUS_PARTIAL_CONTENT +[`NNG_HTTP_STATUS_MULTI_STATUS`]: /api/http.md#NNG_HTTP_STATUS_MULTI_STATUS +[`NNG_HTTP_STATUS_ALREADY_REPORTED`]: /api/http.md#NNG_HTTP_STATUS_ALREADY_REPORTED +[`NNG_HTTP_STATUS_IM_USED`]: /api/http.md#NNG_HTTP_STATUS_IM_USED +[`NNG_HTTP_STATUS_MULTIPLE_CHOICES`]: /api/http.md#NNG_HTTP_STATUS_MULTIPLE_CHOICES +[`NNG_HTTP_STATUS_MOVED_PERMANENTLY`]: /api/http.md#NNG_HTTP_STATUS_MOVED_PERMANENTLY +[`NNG_HTTP_STATUS_FOUND`]: /api/http.md#NNG_HTTP_STATUS_FOUND +[`NNG_HTTP_STATUS_SEE_OTHER`]: /api/http.md#NNG_HTTP_STATUS_SEE_OTHER +[`NNG_HTTP_STATUS_NOT_MODIFIED`]: /api/http.md#NNG_HTTP_STATUS_NOT_MODIFIED +[`NNG_HTTP_STATUS_USE_PROXY`]: /api/http.md#NNG_HTTP_STATUS_USE_PROXY +[`NNG_HTTP_STATUS_TEMPORARY_REDIRECT`]: /api/http.md#NNG_HTTP_STATUS_TEMPORARY_REDIRECT +[`NNG_HTTP_STATUS_PERMANENT_REDIRECT`]: /api/http.md#NNG_HTTP_STATUS_PERMANENT_REDIRECT +[`NNG_HTTP_STATUS_BAD_REQUEST`]: /api/http.md#NNG_HTTP_STATUS_BAD_REQUEST +[`NNG_HTTP_STATUS_UNAUTHORIZED`]: /api/http.md#NNG_HTTP_STATUS_UNAUTHORIZED +[`NNG_HTTP_STATUS_PAYMENT_REQUIRED`]: /api/http.md#NNG_HTTP_STATUS_PAYMENT_REQUIRED +[`NNG_HTTP_STATUS_FORBIDDEN`]: /api/http.md#NNG_HTTP_STATUS_FORBIDDEN +[`NNG_HTTP_STATUS_NOT_FOUND`]: /api/http.md#NNG_HTTP_STATUS_NOT_FOUND +[`NNG_HTTP_STATUS_METHOD_NOT_ALLOWED`]: /api/http.md#NNG_HTTP_STATUS_METHOD_NOT_ALLOWED +[`NNG_HTTP_STATUS_METHOD_NOT_ACCEPTABLE`]: /api/http.md#NNG_HTTP_STATUS_METHOD_NOT_ACCEPTABLE +[`NNG_HTTP_STATUS_METHOD_PROXY_AUTH_REQUIRED`]: /api/http.md#NNG_HTTP_STATUS_METHOD_PROXY_AUTH_REQUIRED +[`NNG_HTTP_STATUS_REQUEST_TIMEOUT`]: /api/http.md#NNG_HTTP_STATUS_REQUEST_TIMEOUT +[`NNG_HTTP_STATUS_CONFLICT`]: /api/http.md#NNG_HTTP_STATUS_CONFLICT +[`NNG_HTTP_STATUS_GONE`]: /api/http.md#NNG_HTTP_STATUS_GONE +[`NNG_HTTP_STATUS_LENGTH_REQUIRED`]: /api/http.md#NNG_HTTP_STATUS_LENGTH_REQUIRED +[`NNG_HTTP_STATUS_PRECONDITION_FAILED`]: /api/http.md#NNG_HTTP_STATUS_PRECONDITION_FAILED +[`NNG_HTTP_STATUS_CONTENT_TOO_LARGE`]: /api/http.md#NNG_HTTP_STATUS_CONTENT_TOO_LARGE +[`NNG_HTTP_STATUS_URI_TOO_LONG`]: /api/http.md#NNG_HTTP_STATUS_URI_TOO_LONG +[`NNG_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE`]: /api/http.md#NNG_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE +[`NNG_HTTP_STATUS_RANGE_NOT_SATISFIABLE`]: /api/http.md#NNG_HTTP_STATUS_RANGE_NOT_SATISFIABLE +[`NNG_HTTP_STATUS_EXPECTATION_FAILED`]: /api/http.md#NNG_HTTP_STATUS_EXPECTATION_FAILED +[`NNG_HTTP_STATUS_TEAPOT`]: /api/http.md#NNG_HTTP_STATUS_TEAPOT +[`NNG_HTTP_STATUS_UNPROCESSABLE_ENTITY`]: /api/http.md#NNG_HTTP_STATUS_UNPROCESSABLE_ENTITY +[`NNG_HTTP_STATUS_LOCKED`]: /api/http.md#NNG_HTTP_STATUS_LOCKED +[`NNG_HTTP_STATUS_FAILED_DEPENDENCY`]: /api/http.md#NNG_HTTP_STATUS_FAILED_DEPENDENCY +[`NNG_HTTP_STATUS_TOO_EARLY`]: /api/http.md#NNG_HTTP_STATUS_TOO_EARLY +[`NNG_HTTP_STATUS_UPGRADE_REQUIRED`]: /api/http.md#NNG_HTTP_STATUS_UPGRADE_REQUIRED +[`NNG_HTTP_STATUS_PRECONDITION_REQUIRED`]: /api/http.md#NNG_HTTP_STATUS_PRECONDITION_REQUIRED +[`NNG_HTTP_STATUS_TOO_MANY_REQUESTS`]: /api/http.md#NNG_HTTP_STATUS_TOO_MANY_REQUESTS +[`NNG_HTTP_STATUS_HEADERS_TOO_LARGE`]: /api/http.md#NNG_HTTP_STATUS_HEADERS_TOO_LARGE +[`NNG_HTTP_STATUS_UNAVAIL_LEGAL_REASONS`]: /api/http.md#NNG_HTTP_STATUS_UNAVAIL_LEGAL_REASONS +[`NNG_HTTP_STATUS_INTERNAL_SERVER_ERROR`]: /api/http.md#NNG_HTTP_STATUS_INTERNAL_SERVER_ERROR +[`NNG_HTTP_STATUS_NOT_IMPLEMENTED`]: /api/http.md#NNG_HTTP_STATUS_NOT_IMPLEMENTED +[`NNG_HTTP_STATUS_BAD_GATEWAY`]: /api/http.md#NNG_HTTP_STATUS_BAD_GATEWAY +[`NNG_HTTP_STATUS_SERVICE_UNAVAILABLE`]: /api/http.md#NNG_HTTP_STATUS_SERVICE_UNAVAILABLE +[`NNG_HTTP_STATUS_GATEWAY_TIMEOUT`]: /api/http.md#NNG_HTTP_STATUS_GATEWAY_TIMEOUT +[`NNG_HTTP_STATUS_HTTP_VERSION_NOT_SUPP`]: /api/http.md#NNG_HTTP_STATUS_HTTP_VERSION_NOT_SUPP +[`NNG_HTTP_STATUS_VARIANT_ALSO_NEGOTIATES`]: /api/http.md#NNG_HTTP_STATUS_VARIANT_ALSO_NEGOTIATES +[`NNG_HTTP_STATUS_INSUFFICIENT_STORAGE`]: /api/http.md#NNG_HTTP_STATUS_INSUFFICIENT_STORAGE +[`NNG_HTTP_STATUS_LOOP_DETECTED`]: /api/http.md#NNG_HTTP_STATUS_LOOP_DETECTED +[`NNG_HTTP_STATUS_NOT_EXTENDED`]: /api/http.md#NNG_HTTP_STATUS_NOT_EXTENDED +[`NNG_HTTP_STATUS_NETWORK_AUTH_REQUIRED`]: /api/http.md#NNG_HTTP_STATUS_NETWORK_AUTH_REQUIRED <!-- Macros --> +[`NNG_OK`]: /api/errors.md#NNG_OK [`NNG_EINTR`]: /api/errors.md#NNG_EINTR [`NNG_ENOMEM`]: /api/errors.md#NNG_ENOMEM [`NNG_EINVAL`]: /api/errors.md#NNG_EINVAL |
