✅ API can't serialize guid in an object from HttpClient request
The issue can be seen in attached pictures
16 Replies
Nevermind, found solution
what was it?
for some reason request’s content type should have been specified with an attribute fromBody
i’m sure it should have been like that by default, but anyway
yea usually is that by default on Post endpoinits, but I guess not when there is multiple params maybe. It wouldn't know what exactly to deserialize from the body if not explicitely specified
well, in other projects it works well and a request from swagger for example, works fine for this specific endpoint
it's just that it doesn't work if I send a request from httpClient
Mhm no idea why then
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
I see the reason why, and it wasnt httpClient
for some reason aspnet decided to treat that request as fromQuery
and I didn't saw the request link in swagger at first
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
just a cropped image
it was like that all along
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
there is no get endpoints for that url
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
If you have no further questions, please use /close to mark the forum thread as answered