Large number of GET requests
Hi,
I am building a C# .NET app which utilizes the RQM and CCM areas. In our CCM area, we have many workitems which we are doing many GET requests on (in the numbers of 5-25). We discovered that eventually, if we leave the session open and have more than around 100-200 GET requests (not sure of the exact # yet), our HttpClient will begin to display a 400 ERROR when trying to request additional GETs. I believe this might a limitation built into the IBM APIs? Again, not sure about this.
Anyway, I was wondering if there is there a way around this? I know that disposing and renewing a HttpClient with the user's credentials is a possibility, but was wondering if there is another easier method, since I believe it is better practice to just have 1 HttpClient running during the entire lifetime of the app.
Thanks,
Michael
One answer
You should be able to perform as many GET requests as you need. However, you need to handle authentication during the whole time you are connected. The authentication expires after a specific time limit and you have to be able to handle the error, reauthenticate and redo the GET. See https://rsjazz.wordpress.com/2021/10/15/elm-authentication/ for how the authentication of a client to a Jazz server works.