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와 autohotkey_l 의 인터넷 창 띄우기 비교예제 2 2011.02.11 17775
836 컴퓨터잡담 AVR 강좌 3 2012.07.07 4859
835 컴퓨터잡담 bat(배치) 파일 제대로 쓰기 2009.11.24 6874
834 컴퓨터잡담 bat(배치)파일 문법 3 2009.11.19 13294
833 컴퓨터잡담 bat(배치)파일 문법 3 2009.11.19 12462
832 컴퓨터잡담 blogapi 기능을 사용하여 xe 게시판으로 글쓰기 2012.11.20 7171
831 Visual C++ c 와 c++ 의 차이점 12 2010.12.05 22390
830 Visual C++ C# - Etrade API 11 file 2013.02.20 15642
829 Visual C++ C# - etrade api site 게시물 1 2013.02.20 32889
828 Visual C++ C#) 입문 - 프로젝트 생성하기 4 file 2013.02.12 18317
827 Visual C++ c++의 상식, 프로그램의 시작 15 2011.01.25 18835
826 컴퓨터잡담 CANON PRINTER ERROR CODE B203, B204 해결방법 2023.09.17 90860
825 HTMLPHPMSQL CCS 메뉴 스타일 링크 2021.08.04 3891
824 컴퓨터잡담 CCTV VIEWEASYV2 file 2019.05.31 4152
823 파이썬 chatGPT file 2023.02.11 4401
822 프로세스 CKAgent.exe npkcmsvc.exe nvsvc32.exe 1 2011.02.07 13221
821 AutoHotKey COM 사용 1 2011.02.21 19066
820 AutoHotKey com.ahk 1 2011.02.09 18260
819 AutoHotKey Com_invoke to login 2011.02.11 10712
818 컴퓨터잡담 CPU-Z file 2019.02.23 3924
Board Pagination Prev 1 ... 3 4 5 6 7 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소