ember-custom-actions icon indicating copy to clipboard operation
ember-custom-actions copied to clipboard

Passing completely empty payload in custom action

Open westd opened this issue 7 years ago • 1 comments

Hi, my server expects payloads for actions to be form parameters (application/x-www-form-urlencoded) and not json. Alternatively it will accept an empty payload and the parameters can be passed as query parameters instead. I'm trying to set an empty payload both when calling the custom action, and in the dataForCustomAction method. However ember-custom-actions is turning this empty string payload into an empty object which ends up sending 2 characters '{}' to the server. This is enough for the server to not accept the query parameters i'm passing.

Do you have any work arounds for this to allow me to send a completely empty payload (or alternatively to send form parameters as the payload rather than json)

Thanks!

westd avatar Jul 26 '18 08:07 westd

hmm sorry :/ its not possible right now. It needs to be implemented

Exelord avatar Jul 31 '18 00:07 Exelord