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

Python Requests post() Method

조회 수 1344 추천 수 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
번호 분류 제목 날짜 조회 수
617 컴퓨터잡담 [잦은오류해결] 오류발생을 알려주는 drwtsn32.exe 때문에 다운? 차라리 없애버리자. 2010.08.12 5838
616 컴퓨터잡담 해외속도테스트 사이트 speedtest.net 2 2012.01.08 5843
615 HTMLPHPMSQL PHP강좌 MySQL 연동 2014.11.11 5845
614 WindowsTip JAVA 7 다운로드 file 2015.01.23 5905
613 컴퓨터잡담 XyView DVR 공유기 설정방법 2011.11.17 5908
612 컴퓨터잡담 PC에서 스마트폰 원격제어하는 프로그램 2 2012.01.09 5938
611 AutoHotKey ET프로젝트 2 file 2012.03.14 5943
610 컴퓨터잡담 도스 텍스트 TXT 파일에 내용 추가하기 2010.07.23 5953
609 컴퓨터잡담 울산<->경주<->포항 복선전철화 기대 2 2012.04.18 5960
608 컴퓨터잡담 [윈도우] 명령어 모음 2011.07.19 5974
607 컴퓨터잡담 [php] DOM Paser 예제 2011.08.31 5991
606 컴퓨터잡담 한글입력이 안될때 의심해봐야 할 파일 imm32.dll 2011.12.14 5999
605 컴퓨터잡담 스누피 고스트 file 2010.10.01 6031
604 컴퓨터잡담 IP초과로 인터넷이 안될때 2011.12.14 6039
603 컴퓨터잡담 인터넷속도 단위 3 1 2012.01.25 6060
602 컴퓨터잡담 TCP View로 네트워크 트래픽 유발 프로그램 찾아내기 file 2012.10.18 6064
601 WindowsTip 익스플로러 업데이트 안될때의 패치 file 2012.07.02 6068
600 컴퓨터잡담 쓸데없는 시작 프로그램을 없애자 2010.04.10 6107
599 Excel 엑셀 지정행 반복인쇄 하는 방법[지정행/지정열] file 2015.12.04 6138
598 컴퓨터잡담 윈도우 PC에서 안드로이드 앱 실행 file 2018.09.25 6211
Board Pagination Prev 1 ... 14 15 16 17 18 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소