Python
[Python] Requests Module
취미와 밥줄사이
2021. 11. 3. 15:40
Requests 모듈이란
- requests 모듈을 사용하면 Python을 사용하여 HTTP 요청을 보낼 수 있습니다.
- HTTP 요청은 모든 응답 데이터(content, encoding, status, etc)와 함께 응답 개체를 반환합니다.
문법
requests.methodname(params)
메소드
Method | Description |
delete(url, args) | 지정된 URL에 DELETE 요청을 보냅니다. |
get(url,, params, args) | 지정된 URL에 GET 요청을 보냅니다. |
head(url, args) | 지정된 URL에 HEAD 요청을 보냅니다. |
patch(url, data, args) | 지정된 URL에 PATCH 요청을 보냅니다. |
post(url, data, json, args) | 지정된 URL에 POST 요청을 보냅니다. |
put(url, data, args) | 지정된 URL에 PUT 요청을 보냅니다. |
request(method, url, args) | 지정된 URL에 지정된 메소드의 요청을 보냅니다. |
REFERENCE
https://www.w3schools.com/python/module_requests.asp
Python Requests Module
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com