> For the complete documentation index, see [llms.txt](https://shhn0509.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shhn0509.gitbook.io/javascript/web/ajax/cross-domain/client/jsonp.md).

# JSONP방식으로요청

[JSONP(JSONwithPadding)](https://ko.wikipedia.org/wiki/JSONP)방식의 요청은 일반적인 Ajax 요청과 다릅니다. Ajax의 데이터 타입 요청이 아닌, `<script>`호출 방식으로 요청합니다. `<script>`로 요청 되는 호출은 보안 정책이 적용 되지 않는다는 점을 이용한 우회 방법입니다.&#x20;

즉, 호출된 결과를 javascript로 실행시키는 방법입니다. 단점은 리소스 파일을 GET 메서드로 읽어 오기 때문에 GET 방식의 API만 요청이 가능합니다.

{% hint style="info" %}
리소스 파일이란?

**리소스 파일**이란 확장자가 .rc 인 텍스트 파일이며 공통으로 사용되는 XAML, XML, 이미지, 동영상, 음악 등 컴파일 되지 않는 모든 '비 실행(non-executable)' 파일을 말한다.\
\
참고 : [마이크로 소프트 문서 - 리소스 파](https://docs.microsoft.com/en-us/windows/win32/menurc/about-resource-files)일
{% endhint %}

![](/files/-MR8Wmr-vjLqXdBQqcJk)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://shhn0509.gitbook.io/javascript/web/ajax/cross-domain/client/jsonp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
