Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read response body as a stream in netflix zuul 2 #606

Closed
mahesh-iyer opened this issue Aug 16, 2019 · 2 comments
Closed

Read response body as a stream in netflix zuul 2 #606

mahesh-iyer opened this issue Aug 16, 2019 · 2 comments
Labels

Comments

@mahesh-iyer
Copy link

How can I read the HttpResponseMessage body as a stream one line at a time in zuul 2? I am currently doing the following:

@Override
HttpResponseMessage apply(HttpResponseMessage input) {
    String text = input.getBodyAsText()  //want to avoid reading the whole content
    //read one line as a stream and process it
    return input
}

I know that we can read content in chunks by overriding processContentChunk() method but there's no control on the size of each chunk. I want to be able to load and read one line at a time till I encounter newline char. Kindly suggest ways to stream the data (if it is possible in zuul 2).

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 30, 2024
Copy link

github-actions bot commented Oct 7, 2024

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant