MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / onResponseBodyData

Method onResponseBodyData

Libraries/Http/HttpAsyncClient.cpp:822–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820 if (not responseDecoder->AsyncReadableStream::eventError
821 .addListener<HttpAsyncClient, &HttpAsyncClient::onCompressedResponseError>(*this))
822 return Result::Error(HttpResultCategory, HttpError::ClientDecoderListenerUnavailable);
823 if (not responseDecoder->AsyncWritableStream::eventError
824 .addListener<HttpAsyncClient, &HttpAsyncClient::onCompressedResponseError>(*this))
825 return Result::Error(HttpResultCategory, HttpError::ClientDecoderListenerUnavailable);
826
827 response.attachReadableStream(*responseDecoder);
828 responseDecoderActive = true;
829 return Result(true);
830}
831
832Result HttpAsyncClient::startResponseStreams()
833{
834 if (responseDecoderActive)
835 {
836 if (responseDecoder->AsyncReadableStream::canStart())
837 {
838 SC_TRY(responseDecoder->AsyncReadableStream::start());
839 }
840 else
841 {
842 responseDecoder->AsyncReadableStream::resumeReading();
843 }
844 }
845 return response.startBodyStream();
846}
847
848void HttpAsyncClient::detachResponseDecompression()
849{

Callers

nothing calls this directly

Calls 2

getReadableDataMethod · 0.80
processBodyDataMethod · 0.80

Tested by

no test coverage detected