forked from boostorg/beast
Change Body::size signature (API Change):
fix #497 This changes the function signature to accept the `value_type` instead of the entire message. Actions Required: * For any user-defined models of Body, change the function signature to accept `value_type const&` and modify the function definition accordingly.
This commit is contained in:
1 parent
b5be1e0d0d
commit
611e610c0c
11 files changed
+41
-31
No files matched your search
@@ -66,6 +66,11 @@ struct Body
|
||||
class reader;
|
||||
|
||||
class writer;
|
||||
|
||||
// Optional member
|
||||
static
|
||||
std::uint64_t
|
||||
size(value_type const&);
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ In this table:
|
||||
the message body for serialization.
|
||||
]
|
||||
][
|
||||
[`X::size(m)`]
|
||||
[`X::size(X::value_type const& v)`]
|
||||
[`std::uint64_t`]
|
||||
[
|
||||
If present, returns the serialized size of `m.body` not including
|
||||
If present, returns the serialized size of `v` not including
|
||||
any chunked transfer encoding. When this function is provided,
|
||||
[link beast.ref.beast__http__message.prepare `message::prepare`]
|
||||
will automatically set the content length field based on the
|
||||
@@ -80,10 +80,9 @@ struct body
|
||||
class writer;
|
||||
|
||||
/// Returns the body's payload size
|
||||
template<bool isRequest, class Fields>
|
||||
static
|
||||
std::uint64_t
|
||||
size(message<isRequest, empty_body, Fields> const& m);
|
||||
size(value_type const& v);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user