확장 기능

HTTP Client

외부 서비스의 API를 통해 연결하고 상호작용합니다.

Logo
Target Image

Click to watch tutorial video - 03:08

GraphQL 스키마에는 웹 서버에 HTTP 요청을 실행하고 응답을 가져오는 글로벌 필드가 제공됩니다.

REST API, GraphQL API, 범용 API에 대한 연결을 지원하며, HTML, XML, CSV를 포함한 모든 유형의 데이터를 가져오고 디코딩할 수 있습니다.

REST API: 이 쿼리는 외부 웹사이트의 WP REST API에 연결하여 게시물을 가져옵니다:

query {
  postData: _sendJSONObjectItemHTTPRequest(input: {
    url: "https://some-wp-rest-api.com/wp-json/wp/v2/posts/1/"
  })
}

...다음과 같은 응답이 반환됩니다:

{
  "data": {
    "postData": {
      "id": 1,
      "date": "2019-08-02T07:53:57",
      "date_gmt": "2019-08-02T07:53:57",
      "guid": {
        "rendered": "https:\/\/newapi.getpop.org\/?p=1"
      },
      "modified": "2021-01-14T13:18:39",
      "modified_gmt": "2021-01-14T13:18:39",
      "slug": "hello-world",
      "status": "publish",
      "type": "post",
      "link": "https:\/\/newapi.getpop.org\/uncategorized\/hello-world\/",
      "title": {
        "rendered": "Hello world!"
      },
      "content": {
        "rendered": "\n<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!<\/p>\n\n\n\n<p>I&#8217;m demonstrating a Youtube video:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Introduction to the Component-based API by Leonardo Losoviz | JSConf.Asia 2019\" width=\"750\" height=\"422\" src=\"https:\/\/www.youtube.com\/embed\/9pT-q0SSYow?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><figcaption>This is my presentation in JSConf Asia 2019<\/figcaption><\/figure>\n",
        "protected": false
      },
      "excerpt": {
        "rendered": "<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing! I&#8217;m demonstrating a Youtube video:<\/p>\n",
        "protected": false
      },
      "author": 1,
      "featured_media": 0,
      "comment_status": "closed",
      "ping_status": "open",
      "sticky": false,
      "template": "",
      "format": "standard",
      "meta": [],
      "categories": [
        1
      ],
      "tags": [
        193,
        173
      ]
    }
  }
}

GraphQL API: 이 쿼리는 GitHub의 GraphQL API에 연결하여 저장소 목록을 가져옵니다:

query FetchGitHubRepositories(
  $login: String!
  $githubAccessToken: String!
) {
  _sendGraphQLHTTPRequest(input:{
    endpoint: "https://api.github.com/graphql",
    query: """
    
query GetRepositoriesByOwner($login: String!) {
  repositoryOwner(login: $login) {
    repositories(first: 100) {
      nodes {
        id
        name
        description
      }
    }
  }
}
 
    """,
    variables: [
      {
        name: "login",
        value: $login
      }
    ],
    options: {
      auth: {
        password: $githubAccessToken
      }
    }
  })
}

범용 API: 이 쿼리는 WordPress RSS 피드에 연결하고 XML을 JSON 객체로 디코딩합니다:

query {
  _sendHTTPRequest(input: {
    url: "https://wordpress.com/blog/2024/07/16/wordpress-6-6/feed/rss/?withoutcomments=1"
  }) {
    body
    rssJSON: _strDecodeXMLAsJSON(
      xml: $__body
    )
  }
}

All-Inclusive 번들 구매

Personal
$79
/
“All-Inclusive” 번들
라이선스 대상 1 도메인
구매 ->
  • 1 도메인
  • 지원
  • 제품 업데이트
Organization
$99
/
“All-Inclusive” 번들
라이선스 대상 3 도메인
구매 ->
  • 3 도메인
  • 지원
  • 제품 업데이트
Professional
$199
/
“All-Inclusive” 번들
라이선스 대상 10 도메인
구매 ->
  • 10 도메인
  • 지원
  • 제품 업데이트

라이선스는 1년간 유효합니다 (매년 갱신 가능). 가격은 USD 기준입니다.

더 많은 도메인이 필요하신가요? 문의하기

30일 환불 보장

각 확장 기능은 환불 신청 보장과 함께 구매하실 수 있습니다

Features illustration
Money back guarantee

환불 정책을(를) 읽어보세요

Testimonial image

“이 플러그인은 완전히 다른 차원입니다! 사이트를 전혀 새로운 수준으로 끌어올려 강력한 파워하우스로 변모시켜 줍니다. 할 수 있는 것들을 탐색하면 할수록 감동이 깊어집니다. 망설이고 있다면 지금 바로 구매하세요. 나중에 후회하게 될 겁니다. 문서는 그 자체만으로도 설명이 되고, 이보다 더 충실할 수 없을 정도입니다. Leo(개발자)는 제가 만나본 중에서 가장 날카롭고 기민한 개발자 중 한 명입니다. 응답이 매우 빠르고 자신의 전문 분야를 완벽하게 파악하고 있다는 것이 느껴집니다. 이 플러그인이 이토록 많은 것을 할 수 있다는 것에 진심으로 흥분됩니다. 가능성은 사실상 무한하며, SEO를 중요시한다면 이 플러그인이 사이트 순위를 크게 높여줄 것입니다.”

olmate - 웹 개발자

뉴스레터 구독하기

Gato GraphQL의 모든 업데이트를 놓치지 마세요.