-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
HttpClient: ERROR TypeError: CreateListFromArrayLike called on non-object #18885
Comments
Faced similar issue & found that this error only occurs if you pass
|
@aks0020 it doesn't make sense. It's type safe, if I try to pass a So, in my case it's a |
it is type safe but in my case it was coming from global state(class which has 'any' type property) in short if you declare |
I suggest you to try passing static string val "test" in both your headers. if you are still facing issue with static val & then your case might be different. |
In my case is already coming as a |
ok then you should try with only one header with fixed val & then 2 headers (req.headers.set('ModuleId', this.dnnContext.moduleId).set('TabId', this.dnnContext.tabId)), just try to narrow down issue as I am not getting any errors with similar code(https://angular.io/guide/http#setting-new-headers) & with 2 string headers now. you might have some other issue with header value like its length/format/encoding. |
Thanks @aks0020 - I created a project apart. as I could not find the issue and it's working now. Closing the issue! |
Wow, @aks0020 you were completely right. The ids were coming in as numeric... |
@aks0020 you made my day! However, @dgroh I think you should not close this issue, but add the new info. I still believe this should be fixed to avoid getting the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Current behavior
After adding headers to the cloned request and calling
.get
I get the following exception:This is my interceptor:
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: