You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started to use this nuget package for connecting to the api of my zabbix 6.0.23 installation.
I created my new project as .Net 8 application and want to use asynchrone methods.
Receiving all host groups gives me the following exception.
var groups = await _zabbixCore.HostGroups.GetAsync()
System.InvalidOperationException: Misused header name, 'content-type'. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.
at System.Net.Http.Headers.HttpHeaders.GetHeaderDescriptor(String name)
at System.Net.Http.Headers.HttpHeaders.Add(String name, String value)
at Zabbix.Core.ZabbixCore.SendRequestAsync[T](Object params, String method, String token)
at Zabbix.Core.ZabbixCore.SendRequestAsync[T](Object params, String method)
at Zabbix.Services.CrudServices.GetService`2.GetAsync(TEntityFilter filter)
at Zabbix.Services.CrudServices.CrudService`3.GetAsync(TEntityFilter filter)
When I call the method synchroniously everything works fine. var groups = _zabbixCore.HostGroups.Get()
I Suspect the following line of code to be the issue, but I don't know why this piece is added:
Hi,
I just started to use this nuget package for connecting to the api of my zabbix 6.0.23 installation.
I created my new project as .Net 8 application and want to use asynchrone methods.
Receiving all host groups gives me the following exception.
var groups = await _zabbixCore.HostGroups.GetAsync()
When I call the method synchroniously everything works fine.
var groups = _zabbixCore.HostGroups.Get()
I Suspect the following line of code to be the issue, but I don't know why this piece is added:
Zabbix-6.0-Api/Zabbix/Core/ZabbixCore.cs
Line 134 in 39d73b0
The text was updated successfully, but these errors were encountered: