OADA / oada-cache

2 stars 0 forks source link

Content-Type on DELETE #11

Open awlayton opened 4 years ago

awlayton commented 4 years ago

The library seems to require a content type for a DELETE? Is this intended? Seems strange to me.

aultac commented 4 years ago

Yes, the way it currently works is a big pain. As we’ve used it over time, it seems to me that content-type should only be required for initial resource creation: i.e. a PUT/POST if there is no resource there already. GET, DELETE, and PUT/POST to an existing resource should just use the content-type on the resource already and ignore the content-type header on the server.

We haven’t worked out how to change the content type of a resource which could affect this depending on what we choose to do.

I’m all for removing the requirement for content-type for all cases except resource creation.

Aaron

On Jan 27, 2020, at 11:29 PM, Alex Layton notifications@github.com wrote:

The library seems to require a content type for a DELETE? Is this intended? Seems strange to me.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OADA/oada-cache/issues/11?email_source=notifications&email_token=AA2KEUFSTYTK5UJ2B3Y2SN3Q76YENA5CNFSM4KMMG6MKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJDQ7WQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2KEUDSJNYSTX5ZXANKOJTQ76YENANCNFSM4KMMG6MA.