PUT 요청
api_key와 url을 쿼리 파라미터로 사용하여 요청 본문을 Web Scraping API로 전송함으로써 대상 URL로 PUT 요청을 전달합니다. PUT을 요구하는 REST 엔드포인트를 호출할 때 이 기능을 사용하세요.
엔드포인트
섹션 제목: “엔드포인트” PUT https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>
매개변수
섹션 제목: “매개변수”| 매개변수 | 유형 | 필수 | 설명 |
|---|---|---|---|
api_key | string | 예 | Web Scraping API 키 |
url | string | 예 | PUT을 전송할 대상 URL |
요청 본문은 대상 URL로 그대로 전달됩니다.
요청 예시
섹션 제목: “요청 예시”curl -X PUT "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https%3A%2F%2Fhttpbin.org%2Fput" \ -H "Content-Type: application/json" \ --data '{"foo":"bar"}'import requests
r = requests.put( "https://scrape.shifter.io/v1", params={"api_key": "YOUR_API_KEY", "url": "https://httpbin.org/put"}, json={"foo": "bar"},)print(r.json())import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'https://httpbin.org/put',});const res = await fetch(url, { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ foo: 'bar' }),});console.log(await res.json());응답 예시
섹션 제목: “응답 예시”{ "args": {}, "data": "{\"foo\":\"bar\"}", "headers": { "Content-Type": "application/json", "Host": "httpbin.org" }, "json": { "foo": "bar" }, "origin": "185.162.168.36", "url": "https://httpbin.org/put"}