diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-22 11:40:36 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-22 11:40:36 -0800 |
| commit | 8d1b52931b1d7ad8fabffe0098b9bc31c0b61a9b (patch) | |
| tree | b6bf2966a0fa4dbabcd06bdaf0135776f11f6563 /docs | |
| parent | 6800bdd8b9e3fd4488bab56cd9fb12206d0631f6 (diff) | |
| download | nng-8d1b52931b1d7ad8fabffe0098b9bc31c0b61a9b.tar.gz nng-8d1b52931b1d7ad8fabffe0098b9bc31c0b61a9b.tar.bz2 nng-8d1b52931b1d7ad8fabffe0098b9bc31c0b61a9b.zip | |
http: method on request structure is now static
This saves yet another allocation. It also no longer returns a value
making this a breaking change.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nng_http_req_set_method.3http.adoc | 15 | ||||
| -rw-r--r-- | docs/ref/migrate/nng1.md | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/docs/man/nng_http_req_set_method.3http.adoc b/docs/man/nng_http_req_set_method.3http.adoc index bc80b832..9cd4f638 100644 --- a/docs/man/nng_http_req_set_method.3http.adoc +++ b/docs/man/nng_http_req_set_method.3http.adoc @@ -20,7 +20,7 @@ nng_http_req_set_method - set HTTP request method #include <nng/nng.h> #include <nng/supplemental/http/http.h> -int nng_http_req_set_method(nng_http_req *req, const char *method); +void nng_http_req_set_method(nng_http_req *req, const char *method); ---- == DESCRIPTION @@ -32,17 +32,10 @@ be upper case. The default value method for newly allocated requests is "GET". -A local copy of the _method_ is made in the request _req_. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. +If the method is longer than 32 bytes, it may be silently truncated. +(There are no methods defined that are this long.) -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory to perform the operation. -`NNG_ENOTSUP`:: No support for HTTP in the library. +A local copy of the _method_ is made in the request _req_. == SEE ALSO diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index bff5b581..bca68e38 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -219,6 +219,10 @@ accessors functions are provided: - `u_host` is removed - use [`nng_url_hostname`] and [`nng_url_port`] to construct if needed - `u_rawurl` is removed - a "cooked" URL can be obtained from the new [`nng_url_sprintf`] function. +## HTTP API + +The [`nng_http_req_set_method`] no longer returns a value. It never fails, but it may truncate an unreasonably long value. + ## Security Descriptors (Windows Only) The `NNG_OPT_IPC_SECURITY_DESCRIPTOR` option is removed, and replaced |
