Skip to content
컴퓨터잡담
2021.08.31 08:09

Python Requests post() Method

조회 수 1343 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Python Requests post() Method

 

https://www.w3schools.com/python/ref_requests_post.asp

Python Requests post() Method

❮ Requests Module


Example

Make a POST request to a web page, and return the response text:

import requests

url = 'https://www.w3schools.com/python/demopage.php'
myobj = {'somekey''somevalue'}

x = requests.post(url, data = myobj)

print(x.text)
Run Example »

Definition and Usage

The post() method sends a POST request to the specified url.

The post() method is used when you want to send some data to the server.


Syntax

requests.post(url, data={keyvalue}, json={keyvalue}, args)

args means zero or more of the named arguments in the parameter table below. Example:

requests.post(url, data = myobj, timeout=2.50)

Parameter Values

Parameter   Description
url Try it Required. The url of the request
data Try it Optional. A dictionary, list of tuples, bytes or a file object to send to the specified url
json Try it Optional. A JSON object to send to the specified url
files Try it Optional. A dictionary of files to send to the specified url
allow_redirects Try it Optional. A Boolean to enable/disable redirection.
Default True (allowing redirects)
auth Try it Optional. A tuple to enable a certain HTTP authentication.
Default None
cert Try it Optional. A String or Tuple specifying a cert file or key.
Default None
cookies Try it Optional. A dictionary of cookies to send to the specified url.
Default None
headers Try it Optional. A dictionary of HTTP headers to send to the specified url.
Default None
proxies Try it Optional. A dictionary of the protocol to the proxy url.
Default None
stream Try it Optional. A Boolean indication if the response should be immediately downloaded (False) or streamed (True).
Default False
timeout Try it Optional. A number, or a tuple, indicating how many seconds to wait for the client to make a connection and/or send a response.
Default None which means the request will continue until the connection is closed
verify Try it
Try it
Optional. A Boolean or a String indication to verify the servers TLS certificate or not.
Default True
 
로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
97 WindowsTip XP USB 부팅디스크 만들기 & 고스트 2015.01.08 2089
96 Server XE <title>제목 - 사이트명</title> 으로 변경방법 2016.04.19 2055
95 컴퓨터잡담 파이썬 게시물 검색으로 새로운 게시물 등록시 지메일로 파일 보내기 2021.06.14 2043
94 컴퓨터잡담 파이썬 파라미터 변수값 전달받기 2021.06.16 2040
93 Server 오토셋과 apmsetup file 2016.02.17 2026
92 WindowsTip 멀티부팅 USB 만들기 file 2015.03.01 2006
91 Server XCOPY로 중요파일 백업하기 2016.03.26 1978
90 WindowsTip 공유기의 공인IP(Wan) 미할당으로 안되는 증상이 잦은경우 대처방법 file 2015.01.22 1967
89 파이썬 파이썬 any, all 사용하기(배열데이터 안에 값이 하나라도 있는지 또는 모두 있는지 비교) 2021.09.11 1956
88 Server 파일 업로드 폴더 변경 2015.07.13 1953
87 Server XE Request 줄이기 file 2016.09.07 1937
86 WindowsTip ISO USB 굽기 최고의 프로그램 file 2015.03.20 1903
85 컴퓨터잡담 파이썬으로 네이버 증권정보 추출하기 2021.06.05 1874
84 Server XE Content font-size:수정방법 file 2016.04.19 1864
83 컴퓨터잡담 [파이썬] 설치 및 사용방법 file 2021.03.12 1859
82 파이썬 파이썬 매수할 피라미드 매수전략 2021.09.06 1853
81 Server PHP Opcache 속도개선 시키기 2016.03.07 1829
80 WindowsTip usb 쓰기가 금지되어 있습니다 해제방법 file 2015.01.22 1827
79 컴퓨터잡담 파이썬 웹페이지 기업정보 추출하기 2021.06.02 1823
78 WindowsTip 윈도우 빠른종료 팁 file 2014.12.27 1823
Board Pagination Prev 1 ... 40 41 42 43 44 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소