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
// settings.url might be: "/restful/" such as "/restful/user"
var service = settings.url.match(//restful/(.*)$/);
if ( service ) {
return {
proxy: "/mocks/" + service[1] + ".json"
};
}
// If you get here, there was no url match
return;
});
Using this method fails to redirect POST data to proxy url
Have to use crutches
$.mockjax(function(settings) {
// settings.url might be: "/restful/" such as "/restful/user"
var service = settings.url.match(//restful/(.*)$/);
if ( service ) {
return {
proxy: "/mocks/" + service[1] + ".json"
};
}
// If you get here, there was no url match
return;
});
Using this method fails to redirect POST data to proxy url
Have to use crutches
proxyType: settings.type,
data: settings.data,
headers: settings.headers,
contentType: settings.contentType
The text was updated successfully, but these errors were encountered: