기술 블로그 (Tech Blog)/검색용 개발 블로그
Javascript 에서 외부 URL 호출 하기
devWonny
2021. 12. 7. 09:01
javascript 외부 url 호출
자바스크립트에서 외부 URL 호출하는 방법
https://blog.naver.com/PostView.nhn?isHttpsRedirect=true&blogId=tius1234&logNo=220509260736
https://www.daleseo.com/js-window-fetch/
위 사이트를 보고
fetch를 이용해서 외부 url을 여러번 호출하려고 한다.
fetch("https://act.ad-max.co.kr/track/receive_web?tracker_id=vegas&action=purchase&adkey=test&ip=&country=KR&click_time=1638783197&event_time=1638783793&rev=68000¤cy=KRW&json={'order_id':'텍스처라이징 솔트 스프레이 200ml','order_price':'68000','order_currency':'KRW','order_detail':[]}&hash_id=b43a9688760f8d410f6598218bf2d344f72c07f9&version=stable-2.10.07-20191029173619")
.then((response)=> console.log("response:", response))
.catch((error) => console.log("error:", error));
console.log("end");
이 코드만 집어넣었는데 왜??? 안되징....