-
Notifications
You must be signed in to change notification settings - Fork 449
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
One SendRequest makes multiple API calls #490
Comments
@nitinmahajan10 it seems doesn't possible for me. Did you Azure function app will return 3XX or 401 response? You can set the |
@Huachao thanks for quick response. I checked the behavior is when response is "500 Internal Server Error" or returning this: This happens even after setting : |
@nitinmahajan10 do you mean no matter enable redirection or not, click |
I'm getting the same behavior. If my rest service returns a 500 it will attempt 3 times before returning the response. If the response is a 200 it only makes a single call. It seems as if there is some error handling to automatically retry the request up to 3 times. If this is the case then a setting to disable or set the number of retries would be nice. |
Looks like this is coming from
It's hardcoded to retry twice on EOL |
@brentahughes @nitinmahajan10 the root cause is that the underlying httpclient package |
@brentahughes @nitinmahajan10 you can verify this in the latest version 0.23.1 |
@Huachao This update has broken my usage of the REST Client. I'm not exactly sure which change broke, but I suspect this one. There are a lot of redirects that happen on login attempt and now I can't successfully login after this update. If there is some logging I can enable on the Rest Client or something, maybe I could be more specific. |
@dakaraphi you mean a lot of redirects happened in the login API? Are there any redirected URLs contains port number in it? |
I honestly don't know exactly what is happening. I'm just aware that redirects are sometimes used. It is not an area of code I work on, so I'm going to have to figure out a way to debug the problem. It will not be easy from the server side as it is very complex, so I was hoping there was some way of logging in more detail what is happening with the client. |
@dakaraphi can you try if this version of extension works, you need to install it in the |
It does not work. So must be some other change. I will create a new issue. |
Version: 1.41.1 (system setup)
Date: 2019-12-18T14:58:56.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0 V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363
Steps to Reproduce:
Define the Rest API request in "Request.rest" file
@authtoken = ----AAD user Id Token Value----
@hostUrl = http://localhost:7071
get {{hostUrl}}/api/GetUserResources
content-type: application/json
Authorization: Bearer {{authToken}}
fiscalYear: 2020
Start Debugging in VS 2019 for the Azure Function App and put the debug point in the entry function.
Click on the SendRequest link visible in the file.
For one time click, same api is called three times. Debug point hits 3 times. The response in VS code is shown after all 3 calls are complete. This causes very slow feedback loop.
The text was updated successfully, but these errors were encountered: