Open abdulsmrehman opened 6 years ago
For reference, here’s where this question was asked and @jeroencornelissen & @ivospinheiro helpfully provided a workaround: https://gitter.im/canjs/canjs?at=59bfa1b5cfeed2eb652288b1
Can this configuration be added to the can-connect url behavior?
Description : I want pass a vendor specific Media type on the request header , But can-connect/data/url supports only 2 media type "application/json" and "application/x-www-form-urlencoded" others are marked unsupported and the default content type["application/json"] is used, when any unsupported type is passed .
var connection = persist({ url: { createData: "POST /api/restaurants", contentType: "application/vnd.vendorspecific-v1+json" } });
Is there a way that i can override findContentType of url.js which actually does this validation and returns default "application/json" type. Please provide your suggestion on how to tackle this,