Package ru.tinkoff.kora.http.common.body
Interface HttpBodyOutput
- All Superinterfaces:
AutoCloseable,Closeable,Flow.Publisher<ByteBuffer>,HttpBody
- All Known Implementing Classes:
DefaultFullHttpBody,EmptyHttpBody,StreamingHttpBodyOutput
Русский: Описывает тело HTTP ответа
English: Describes HTTP response body
Пример / Example:
English: Describes HTTP response body
Пример / Example:
HttpBody.of("application/octet-stream", new byte{ 0x0 })
-
Method Summary
Modifier and TypeMethodDescriptionlongstatic HttpBodyOutputoctetStream(long length, Flow.Publisher<? extends ByteBuffer> content) static HttpBodyOutputoctetStream(InputStream inputStream) static HttpBodyOutputoctetStream(Flow.Publisher<? extends ByteBuffer> content) static HttpBodyOutputof(String contentType, long length, InputStream inputStream) static HttpBodyOutputof(String contentType, long length, Flow.Publisher<? extends ByteBuffer> content) static HttpBodyOutputof(String contentType, InputStream inputStream) static HttpBodyOutputof(String contentType, Flow.Publisher<? extends ByteBuffer> content) voidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber) default voidwrite(OutputStream os) Methods inherited from interface ru.tinkoff.kora.http.common.body.HttpBody
getFullContentIfAvailable
-
Method Details
-
of
-
of
static HttpBodyOutput of(String contentType, long length, Flow.Publisher<? extends ByteBuffer> content) -
of
-
of
-
octetStream
-
octetStream
-
octetStream
-
contentLength
long contentLength()- Specified by:
contentLengthin interfaceHttpBody- Returns:
- Русский: Возвращает длину тела запроса
English: Returns the length of the body of the request
-
contentType
- Specified by:
contentTypein interfaceHttpBody- Returns:
- Русский: Возвращает тип тела запроса как значения HTTP заголовка
English: Returns request body type as HTTP header values
Пример / Example:application/json
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>
-
write
- Throws:
IOException
-