troyanskiy / ngx-resource-core

RESTful Core Library
40 stars 10 forks source link

Remove body from DELETE requests #20

Closed robelcik closed 6 years ago

robelcik commented 6 years ago

Hello!

I have a resource action like:

@ResourceAction({
    path: '/{!:id}',
    method: ResourceRequestMethod.Delete,
    requestBodyType: ResourceRequestBodyType.NONE
})
deleteRecord: IResourceMethod<{id: number}, void>;

In this setup, the body sent to the server is '{}' (JSON literal for an empty object). I would like my request to have no body at all. Of course, I can override $setRequestOptionsBody() method but it would be nicer to have it done automatically or by resource action's configuration.

troyanskiy commented 6 years ago

Hello. Sorry for the delay in the fix. You can try to update to 5.2.2