|
|
@ -270,11 +270,13 @@ function requestApi(props) {
|
|
|
|
if (typeof(dataBody) === "object") {
|
|
|
|
if (typeof(dataBody) === "object") {
|
|
|
|
dataBody = JSON.stringify(dataBody)
|
|
|
|
dataBody = JSON.stringify(dataBody)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var beforeSend = props.beforeSend || function (request) {}
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: props.url,
|
|
|
|
url: props.url,
|
|
|
|
type: props.method || "PATCH",
|
|
|
|
type: props.method || "PATCH",
|
|
|
|
data: dataBody,
|
|
|
|
data: dataBody,
|
|
|
|
|
|
|
|
beforeSend: beforeSend,
|
|
|
|
contentType: props.content_type || "application/json; charset=utf-8",
|
|
|
|
contentType: props.content_type || "application/json; charset=utf-8",
|
|
|
|
dataType: props.data_type || "json"
|
|
|
|
dataType: props.data_type || "json"
|
|
|
|
}).done(function (data, textStatue, jqXHR) {
|
|
|
|
}).done(function (data, textStatue, jqXHR) {
|
|
|
|