从Python aiohttp获取响应头

时间:2020-08-17 23:17:40

标签: python http-headers aiohttp response-headers quart

我在项目A中使用Python prettier库和aiohttp框架。 在我的项目中,我发出了职位要求。请求完成后,我将返回响应正文,状态代码和响应标头。 我的响应标头如下所示:

quart

在项目B中,我使用<CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '1245', 'x-custom-number': '25', 'Date': 'Mon, 17 Aug 2020 23:09:22 GMT', 'Server': 'hypercorn-h11')> 库向项目A发出请求。但是我的响应标头不包含requests

x-custom-number

如何确保Project B在响应标头中获得{'content-type': 'application/json', 'content-length': '167', 'date': 'Mon, 17 Aug 2020 23:02:02 GMT', 'server': 'hypercorn-h11'}

0 个答案:

没有答案