feat(gax): add StringHttpResponseParser - #14135
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces StringHttpResponseParser, a new implementation of HttpResponseParser that reads HTTP response bodies as UTF-8 strings. It also includes a comprehensive suite of unit tests in StringHttpResponseParserTest covering successful parsing from input streams and readers, empty inputs, error handling, and serialization. I have no further feedback to provide as the implementation is clean and well-tested.
a5e2a65 to
a5a48c7
Compare
57dcd81 to
22ac6ca
Compare
22ac6ca to
a47a8ab
Compare
a47a8ab to
78b8e0f
Compare
|
|
||
| /** An {@link HttpResponseParser} that reads the HTTP response body as a UTF-8 String. */ | ||
| @NullMarked | ||
| class StringHttpResponseParser implements HttpResponseParser<String> { |
There was a problem hiding this comment.
Is this for the response of upload and finalize? Because start would return the proto message defined in the RPC?
a7d8213 to
eb7be2b
Compare
eb7be2b to
4557e00
Compare
|
|
4557e00 to
de816cb
Compare





Currently gax-httpjson includes only one HTTP response parser (ProtoMessageResponseParser) which assumes response bodies can be parsed into protos.
Resumable upload HTTP operations will return non-proto responses (including empty response bodies where all metadata is exchanged via headers/return code) so we'll need a more general response parser to be able to use the existing HTTP stack to talk to the upload service.