Im getting a very ambiguous error when trying to get data via aspnet
the error;
The code:
79 Replies
The json im sending as the body
https://paste.mod.gg/dnngsmodvzpw/0
BlazeBin - dnngsmodvzpw
A tool for sharing your source code with the world!
:foxexited:
what a beefy json
maybe the error is in the sender, not in the receiver
which is what im trying to find out
im actually gonnago insane
![No description](https://cdn.answeroverflow.com/1266641345746042880/image.png)
well, that's fair, it's not valid json
also, where is
guildId
configured
[HttpPost] public async Task<IActionResult> UpdateGuildConfig(ulong guildId, [FromBody] GuildConfig model)like, the route
At the controller class
I’ve tried with valid json too
what do you mean, you've put this in parameter in the routing attribute of the class itself?
Correct
Also I solved this, at least for afk, somehow removing the required attribute fixed it
yes, removing required "fixes" it but
uhm i was sure i wrote another message
what is happening
was it another thread?
i remember saying that some tests could be useful
this issue has reappeared
but this time it doesnt even make sense
the response i send:
The controller code:
The response:
I am actually going to go insane
and yes, i have tried doing {"commandName": "test"} too
How are you sending that data?
Does it work when sending with Swagger or some API client like Bruno or Insomnium?
Tried with postman and swagger, no go
That’s why im stumped, I would expect at least swagger to be able to do it
Try wrapping the parameter into a record or something?
Tried that, then it says it requires that, even if I provide the correct json for it