Hello everybody,
Last week, I wrote an API with this model :
https://www.codeproject.com/Articles/1259484/CRUD-Operation-in-ASP-NET-Core-Web-API-with-Entity
and it ran jolly good.
Yesterday, I wanted to do it again. Well, reference Microsoft.EntityFrameworkCore.Tools.DotNet now seems obsolete and can no more be added to the project, but apart from this I can complete it.
At least, Firefox shows me the list of posts or of categories (I kept the same database).
But, I have a surprise with Postman. I systematically had the answer “Could not get any response”.
After spending some time on it, I realized I had that error only randomly, either with the project of last week, or with the one of yesterday.
And eventually, I solved it by checking, in the settings, “Trim keys and values in request body”.
So, it works, what would be nice, now, would be to understand what happened.
I do not see what could uncheck that if it was checked last week, nor why it is needed today while it was not last week.
So, I read the documentation, and I see :
Trim keys and values in request body: If you’re using the form-data or url-encoded modes to send data to the server, switching this to “ON” will cause any parameters to be trimmed.
OK, so I presume trailing spaces have been suppressed ?
But I ran the same project and sent the same requests, and suddenly it was needed to check this. Any idea what happened ?