Skip to content

Commit

Permalink
Update JQuerySyncGet.html
Browse files Browse the repository at this point in the history
  • Loading branch information
lixinso authored Dec 7, 2021
1 parent bfc4dec commit 8672ae4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions HTTPRequest/JQuerySyncGet.html
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@



function CallWebApi(urlpath,
method,
requestdata,
onsuccessfunc,
onerrorfunc = function (XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.responseText);
console.log(textStatus);
console.log(errorThrown);
})
{

var ajaxRequestConfig =
{
type: method,
url: urlpath,
async: false,
success: function(data){
console.log("success");
onsuccessfunc(data);
},
error: onerrorfunc
}

console.log("ajaxRequestConfig");
console.log(ajaxRequestConfig);

var ajxReq = $.ajax(
ajaxRequestConfig
);

return ajxReq;
}

0 comments on commit 8672ae4

Please sign in to comment.