You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Canjs [can-connect/data/url] supports only "application/json" and "application/x-www-form-urlencoded". Other vendor sepcific contenType are not supported.
#351
Open
abdulsmrehman opened this issue
Sep 18, 2017
· 2 comments
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 .
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,
Software
Version
can-connect version
1.4.1
Browser
chrome
Operating system
Windows
The text was updated successfully, but these errors were encountered:
abdulsmrehman
changed the title
Canjs supports only "application/json" and "application/x-www-form-urlencoded". Other vendor sepcific contenType are not supported.
Canjs [can-connect/data/url] supports only "application/json" and "application/x-www-form-urlencoded". Other vendor sepcific contenType are not supported.
Sep 18, 2017
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,
The text was updated successfully, but these errors were encountered: