Forum Discussion
luk - These 2 look close to your problem, see if these help.
http://community.lithium.com/t5/Developers-Discussion/Endpoint-timeout/m-p/149324
Thanks,
I have found the first one about timouts before I even posted the question, but didn't really seem to be the same problem. I guess there it was somehow a "problem" with the remote API that needed longer than 5s to return the response.
The second link/thread also doesn't apply to my problem as I do not want to actually parse the returned JSON data, I just want to wrap it in a JSON structure (similar to v2 API responses) and return it back, no processing at all, that's why I'm not using .json() on the request object.
The problem is, that from ANY (local/remote) Lithium REST API called via http client the requests time out after 5 seconds, every other non-Lithium API that returns JSON works perfectly well with my approach, just not Lithium Instances, as they wouldn't allow it's own http client to request data from it...which seems quite odd...
I'll request an increased request timeout time from support anyways, maybe the Lithium APIs are just slow?? But I do not have that impression when entering such a URL into the browser, then the data is coming in reasonable time (around 290ms), so that's why I think this is not the issue here...
EDIT: I thought it could be some kind of "User Agent" blocking on Lithiums side and tried so set it via .header("User Agent", "UA String") but didn't help...
Related Content
- 7 years ago
- 5 months ago
- 9 years ago
- 5 years ago
- 2 months ago