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
번호 분류 제목 날짜 조회 수
» 컴퓨터잡담 Python Requests post() Method 2021.08.31 1343
616 파이썬 Python 메타블로그 글쓰기(제로보드, xpressengine blog api) 2021.09.18 3433
615 컴퓨터잡담 python 문자열에서 모든 공백을 제거 2021.08.31 897
614 파이썬 python 에서 구글 캘린더 api 이용하기(server to server) 2021.09.17 3277
613 컴퓨터잡담 Python 파일을 exe파일로 컴파일하기 2021.06.16 1611
612 파이썬 pytube 사용방법 2022.01.22 4190
611 프로세스 reader_sl.exe , AdobeARM.exe 프로세스 삭제방법 3 2011.02.13 32054
610 컴퓨터잡담 rss리더기 2010.03.12 29987
609 컴퓨터잡담 rss리더기 2010.03.12 9260
608 컴퓨터잡담 rss리더기 2010.03.12 9657
607 컴퓨터잡담 rss리더기 2010.03.12 9430
606 컴퓨터잡담 rss리더기 2010.03.12 9399
605 컴퓨터잡담 rss리더기 2010.03.12 9303
604 프로세스 RTHDCPL.EXE / Alcmtr.EXE / SKYTEL.EXE 3 2011.02.06 13681
603 컴퓨터잡담 runDll32.exe 빠른실행, 윈도우 익스플로러 이용하여 실행하는 프로그램 2011.12.26 4393
602 프로세스 rundll32.exe와 svchost.exe 6 2011.02.06 13995
601 컴퓨터잡담 safeout.exe 프로세스 삭제하기 3 2012.03.12 13032
600 프로세스 SBoxSearchBar 프로세스 삭제방법 1 2011.02.13 15524
599 컴퓨터잡담 schtasks 예약된 작업의 스케쥴 3 2011.12.14 10356
598 프로세스 Searchindexer.exe 제거하기 1 2011.03.18 27260
Board Pagination Prev 1 ... 14 15 16 17 18 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소