mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2025-01-03 05:22:24 +08:00
Merge branch 'v1.3.0' into buffered_streams
This commit is contained in:
commit
341812cf29
@ -9,9 +9,11 @@ Contents:
|
|||||||
- [The New oatpp::String](#the-new-oatppstring)
|
- [The New oatpp::String](#the-new-oatppstring)
|
||||||
- [ConnectionPool::get() Timeout](#connectionpoolget-timeout)
|
- [ConnectionPool::get() Timeout](#connectionpoolget-timeout)
|
||||||
- [JSON Serializer Escape Flags](#json-serializer-escape-flags)
|
- [JSON Serializer Escape Flags](#json-serializer-escape-flags)
|
||||||
|
- [Response::getBody()](#responsegetbody)
|
||||||
- [data::stream::FIFOStream](#datastreamfifostream)
|
- [data::stream::FIFOStream](#datastreamfifostream)
|
||||||
- [data::stream::BufferedInputStream](#datastreambufferedinputstream)
|
- [data::stream::BufferedInputStream](#datastreambufferedinputstream)
|
||||||
|
|
||||||
|
|
||||||
## The New oatpp::String
|
## The New oatpp::String
|
||||||
|
|
||||||
Now it's much easier to use `oatpp::String` since `oatpp::String` is now wrapper over `std::string`
|
Now it's much easier to use `oatpp::String` since `oatpp::String` is now wrapper over `std::string`
|
||||||
@ -119,6 +121,11 @@ Output:
|
|||||||
res='"https://oatpp.io/"' # solidus isn't escaped
|
res='"https://oatpp.io/"' # solidus isn't escaped
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Response::getBody()
|
||||||
|
|
||||||
|
`oatpp::web::protocol::http::outgoing::Response` has a new method `getBody()` to retreive the body of the response. This is handy for response interceptors.
|
||||||
|
|
||||||
|
|
||||||
## data::stream::FIFOStream
|
## data::stream::FIFOStream
|
||||||
|
|
||||||
The new `FIFOStream` stream is a buffered
|
The new `FIFOStream` stream is a buffered
|
||||||
@ -133,6 +140,7 @@ buffered in a single stream.
|
|||||||
However, it is not synchronized, so be careful when using `FIFOStream` in a multithreaded manner.
|
However, it is not synchronized, so be careful when using `FIFOStream` in a multithreaded manner.
|
||||||
You need to implement your own locking.
|
You need to implement your own locking.
|
||||||
|
|
||||||
|
|
||||||
## data::stream::BufferedInputStream
|
## data::stream::BufferedInputStream
|
||||||
|
|
||||||
`FIFOStream` also introduced a new interface
|
`FIFOStream` also introduced a new interface
|
||||||
|
@ -48,6 +48,10 @@ protocol::http::Headers& Response::getHeaders() {
|
|||||||
return m_headers;
|
return m_headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<Body> Response::getBody() const {
|
||||||
|
return m_body;
|
||||||
|
}
|
||||||
|
|
||||||
void Response::putHeader(const oatpp::String& key, const oatpp::String& value) {
|
void Response::putHeader(const oatpp::String& key, const oatpp::String& value) {
|
||||||
m_headers.put(key, value);
|
m_headers.put(key, value);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
Headers& getHeaders();
|
Headers& getHeaders();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get body
|
||||||
|
* @return - &id:oatpp::web::protocol::http::outgoing::Body;
|
||||||
|
*/
|
||||||
|
std::shared_ptr<Body> getBody() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add http header.
|
* Add http header.
|
||||||
* @param key - &id:oatpp::String;.
|
* @param key - &id:oatpp::String;.
|
||||||
|
Loading…
Reference in New Issue
Block a user