1

First of all, I have no idea if this is possible! and I'm struggling to find an answer. I think I don't know what to search for!

I have an endpoint that returns IEnumerable, I want to divide the response so I used

.Skip().Take()

Now when I get the first take, how can I get the second one without invoking the same endpoint!

The problem is IEnumerable gets the data from another service where it is not possible to divide, so I have to get everything at once and then I have to call another "SLOW" endpoint that gives me 5 results at the time using what I got from the IEnumerable.

So what I want to do is, divide the first list, do the second call, put the result together, return this and repeat until the list is completed.

Is there a way to keep angular listening for responses and append them as they arrive?

Or can I make another call after I get the result but without requesting the complete list again ? "save it somewhere!".

2
  • what kind of connection is this? socket or http? Commented Sep 21, 2018 at 5:28
  • http using rxjs observable/subscribe I have set the IEnumerable to be static which is working but not sure if this is right! Commented Sep 21, 2018 at 5:54

1 Answer 1

0

The simple answer to what I was trying to achieve is NO it is not possible. The change has to be done on a deeper level (querying the DB).

Using static works but then this is a web application so that would be problematic so again its a NO.

I ended up getting the whole list, then looping through it one by one to get the slow data then show it to the user.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.