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
번호 분류 제목 날짜 조회 수
837 AutoHotKey autohotkey) postmessage mouse control 13 2012.02.22 28629
836 컴퓨터잡담 DIV 라운드박스 쉽게 만들자. 1 1 file 2009.07.24 28592
835 컴퓨터잡담 트랜지스터의 종류와 특정 2013.10.12 28526
834 WindowsTip 네트워크 무선연결이 안될 때의 점검 방법 file 2013.03.12 28276
833 컴퓨터잡담 php 에서 mysql 제어하기 2009.11.28 28200
832 컴퓨터잡담 MySQL FEDERATED / InnoDB is disabled, myint64.dll 오류 어찌하오리 4 2010.04.19 27707
831 AutoHotKey [COM] 자바스크립트 / DOM / HTML 웹페이지 컨트롤 3 2011.02.12 27304
830 프로세스 Searchindexer.exe 제거하기 1 2011.03.18 27262
829 컴퓨터잡담 mysql 접속에러시 재부팅 하는 배치파일 2009.11.24 26693
828 Excel [excel] GET.CELL사용법 8 2012.07.16 26599
827 컴퓨터잡담 부팅시마다 체크디스크 실행되는 경우 설정방법 2010.08.21 26563
826 AutoHotKey [AUTOHOTKEY] FTP 제어 file 2011.02.04 25247
825 Excel 엑셀) 피벗테이블 원본데이터 영역범위 수정방법 1 2 file 2012.03.06 25104
824 컴퓨터잡담 무선공유기(AP) 채널간섭 해결하기 file 2013.08.17 25049
823 컴퓨터잡담 Excel VBA (1): 셀 선택 및 변수 및 비활성시트 컨트롤하기 3 2011.10.24 25003
822 컴퓨터잡담 자바스크립트 변수를 php로 옮기기 2010.02.03 24961
821 WindowsTip Windows-XP 의 [Prefetch] 폴더에 대하여[C:\WINDOWS\Prefetch] 2013.12.04 24630
820 컴퓨터잡담 인터넷 익스플러러 속도 향샹을 위한 팁 1 file 2012.02.25 24571
819 컴퓨터잡담 티맥스OS 무료배포도 판매 수익의 세배이상 가능하다 2 2009.07.26 24566
818 Excel 현재 Excel 파일 이름을 셀에 삽입 2 2012.09.17 24560
Board Pagination Prev 1 ... 3 4 5 6 7 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소