wopian / kitsu

🦊 A simple, lightweight & framework agnostic JSON:API client
https://yarn.fyi/kitsu
MIT License
271 stars 42 forks source link

fix: allow delete method request to send data #986

Open BenjaminMINK opened 5 months ago

BenjaminMINK commented 5 months ago

Hello,

I think the delete method should be allowed to send data on request method

BenjaminMINK commented 5 months ago

Can you add a test that sends a DELETE request with a body in the delete.spec.js file, so that this change is covered? You should be able to utilise one of the existing tests in POST or PATCH.

Okay, I'll add it

BenjaminMINK commented 5 months ago

Hello,

It seems we need more than just adding a single test: with the proposed modification, many tests fails because many are related to the request method which is not handling well different cases, especially in the isValid method called from serialise that we need to also handle the DELETE that can be either empty or filled...

wopian commented 4 months ago

I'll take a look into that in the coming week 👍