Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
825
restSettings contentType works for Create and Update, but not Remove
posted

I am using contentType: x-www-form-urlencoded (with a custom contentSerializer to encode the fields.) This works fine for create's and update's. But for remove's the grid is always sending Content-Type: text/plain.

(Granted, no fields need encoding for HTTP DELETE, but this service expects the same content-type as for POST and PUT.)

Here are my restSettings:

        restSettings: {
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            contentSerializer: iggridUrlEncode,
            create: {
                url: env_constants.DATASERVICES_URL + "/ar_invoices/"
            },
            update: {
                url: env_constants.DATASERVICES_URL + "/ar_invoices/"
            },
            remove: {
                url: env_constants.DATASERVICES_URL + "/ar_invoices/"
            }
        }

Is this a bug, or am I misunderstanding something?

Thanks,

Matt