English 中文(简体)
我如何利用假日获得请求书原封内容。
原标题:How do I get the entire contents of a request s original request header using python

......

POST /service/rapture/session HTTP/1.1
Host: 192.168.136.155:8081
Content-Length: 39
X-Requested-With: XMLHttpRequest
X-Nexus-UI: true
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.127 Safari/537.36
NX-ANTI-CSRF-TOKEN: 0.74934606792014381.1.691978768.1713947526; _gid=GA1.1.1983366476.1713947526; metabase.TIMEOUT=aliv
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*

如何让这一负责人坐下来?

i) 使用了申请方法,但请求书主的内容很少。

问题回答

www.un.org/Depts/DGACM/index_french.htm 甲型六氯环己烷网络在多个层次上要求使用APIC,只提供高级别接口。 因此,不可能用<代码>requests/code>做到这一点。

这是从低水平的APIC中获取原始头盔的一个例子:

import http.client
host = "docs.python.org"
conn = http.client.HTTPSConnection(host)
conn.request("GET", "/3/", headers={"Host": host})
response = conn.getresponse()
print(list(response.headers.raw_items()))

以上法典产生了这样的产出:

[( Connection ,  keep-alive ),
 ( Content-Length ,  19561 ),
 ( server ,  nginx ),
 ( content-type ,  text/html ),
 ( last-modified ,  Wed, 24 Apr 2024 21:00:51 GMT ),
 ( etag ,  "66297303-4c69" ),
 ( x-clacks-overhead ,  GNU Terry Pratchett ),
 ( strict-transport-security ,  max-age=315360000; includeSubDomains; preload ),
 ( Via ,  1.1 varnish, 1.1 varnish ),
 ( Accept-Ranges ,  bytes ),
 ( Date ,  Thu, 25 Apr 2024 02:48:30 GMT ),
 ( Age ,  20831 ),
 ( X-Served-By ,  cache-lga21956-LGA, cache-tyo11964-TYO ),
 ( X-Cache ,  HIT, HIT ),
 ( X-Cache-Hits ,  19, 1 ),
 ( X-Timer ,  S1714013311.518366,VS0,VE1 ),
 ( Vary ,  Accept-Encoding )]

如果不要求低级别APIC,则你可以人工确定<代码>requests/code>的回复方的这种结果。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签