Get verdict for Readable Stream * @throws {VaasInvalidStateError} If connect() has not been called and awaited. Signifies caller error. * @throws {VaasAuthenticationError} Authentication failed. * @throws {VaasConnectionClosedError} Connection was closed. Call connect() to reconnect. * @
(
stream: Readable,
ct: CancellationToken = CancellationToken.fromMilliseconds(
this.defaultTimeoutStreamReq,
),
)
| 84 | * @throws {VaasServerError} Stream could not be read properly in VaaS clouds |
| 85 | */ |
| 86 | public async forStream( |
| 87 | stream: Readable, |
| 88 | ct: CancellationToken = CancellationToken.fromMilliseconds( |
| 89 | this.defaultTimeoutStreamReq, |
| 90 | ), |
| 91 | ): Promise<VaasVerdict> { |
| 92 | const request = this.forStreamRequest(stream).then((response) => response); |
| 93 | return timeout(request, ct.timeout()); |
| 94 | } |
| 95 | |
| 96 | /** Get verdict for URL |
| 97 | * @throws {VaasInvalidStateError} If connect() has not been called and awaited. Signifies caller error. |
nothing calls this directly
no test coverage detected