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

Python Requests post() Method

조회 수 1325 추천 수 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
번호 분류 제목 날짜 조회 수
877 파이썬 파이썬 화면 캡쳐하기 2022.11.26 19343
876 파이썬 Windows용 Tesseract 설치 및 사용법 2022.11.26 19445
875 파이썬 파이썬 글자 인식, 파이썬 OCR, 파이썬 Tesseract 사용 2022.11.21 14641
874 컴퓨터잡담 지존오토 메뉴얼 익스트림 화면 분석기(여러 개의 순환구조) file 2022.09.21 21489
873 컴퓨터잡담 특정 파일을 제외한 현재 디렉토리 내의 모든 파일을 삭제하는 배치파일 2022.07.14 32728
872 파이썬 자바스크립트 종말각?! HTML에서 파이썬 실행하는 PyScript 등장! 2022.06.08 31254
871 파이썬 파이썬 파이인스톨러 설치하기 2022.05.08 21421
870 파이썬 파이썬 구글스프레드시트 값 불러오기 html로 변환작업 중! 2022.05.08 20186
869 파이썬 파이썬 googleapiclient 모듈이 설치가 안될때 해결방법 1 2022.03.27 9823
868 파이썬 Visual Studio Code 파이썬 인터프리터 경로 변경하기 2022.03.09 9265
867 WindowsTip 윈도우10 ALT + TAB 창 전환이 안될 때 대처방법 file 2022.03.09 9097
866 파이썬 파이썬 ModuleNotFoundError: No module named 'pip' 갑자기 나타난 오류! 2022.02.13 4106
865 [Docs]스프레드시트 [구글스프레드시트] 현재의 셀주소 참조(address, cell) 2022.01.26 6451
864 파이썬 pytube 사용방법 2022.01.22 4188
863 파이썬 파이썬 정규표현식 (Regular Expressions) 2021.10.31 3179
862 컴퓨터잡담 로지텍 2021.10.26 2460
861 파이썬 python html tag 제거 경로 금지 문자 제거 2021.10.26 3180
860 컴퓨터잡담 PC를 자동으로 부팅시작 1 file 2021.10.10 4093
859 컴퓨터잡담 로블록스 스튜디오하늘에서 부품을 무작위로 떨어뜨리는 스크립트 2021.09.28 2599
858 컴퓨터잡담 로블록스 스튜디오 파트속성 2021.09.28 3082
Board Pagination Prev 1 2 3 4 5 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소