위 17번 항목으로 정의하신 argCallBackResultUrl로 경로(URL)을 넘겨드립니다.
const url = "https://wininet1.zioyou.com:443/users/user_cud?csrf=6bYxpWQdmCQMEtErEvHrLmH4Hm...";
val AuthKey = "xxxxxxxxxxxxxxxxxxxxxxxxx";
var formData = $('#form1').serialize();
$.ajax({
url: url,
headers: {
'AuthKey': AuthKey //지오유에서 발급된 인증키
,'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'
},
method: 'POST',
dataType: 'json',
cache: false,
data: formData,
success: function(data){
console.log(JSON.stringify(data));
},
error: function (request, status, error){
console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
결과값 : 성공, zurl 나오는걸 볼 수가 있습니다.
declare @Object as int;
declare @ResponseText as varchar(8000);
declare @Body as varchar(8000)=''
exec sp_OACreate 'MSXML2.XMLHTTP',@Object OUT;
exec sp_OAMethod @Object, 'open', NULL, 'post', 'https://wininet1.zioyou.com:443/users/user_cud?csrf=6bYxpWQdmCQMEtErEvHrLmH4Hm...', 'false'
exec sp_OAMethod @Object, 'setRequestHeader', null, 'Content-Type', 'application/x-www-form-urlencoded'
exec sp_OAMethod @Object, 'send', null, @Body
exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
select @ResponseText
exec sp_OADestroy @Object