文章 2024-10-08 来自:开发者社区

详解 httptools 模块,一个 HTTP 解析器

如果你用过 FastAPI 的话,那么你一定知道 uvicorn,它是一个基于 uvloop 和 httptools 实现的高性能 ASGI 服务器。 其中 uvloop 采用 Cython 编写,用于替换 asyncio 中的事件循环,可以让 asyncio 速度增加 2 到 4 倍。而 httptools 是基于 C 语言实现的 HTTP 解析器,用来解析 HTTP 请求的。 ...

详解 httptools 模块,一个 HTTP 解析器
文章 2024-07-13 来自:开发者社区

首先,我们导入了`http.client`模块,它是Python标准库中的一个模块,用于创建和发送HTTP请求。

Python代码示例 import http.client def send_http_request(host, port, path, method='GET', headers={}, body=None): """ 发送HTTP请求到指定的主机和端口,并返回响应。 参数: ...

文章 2024-07-13 来自:开发者社区

使用`http.server`模块搭建简单HTTP服务器

1. 使用http.server模块搭建简单HTTP服务器 代码示例 import http.server import socketserver PORT = 8000 Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(("", PORT), Handler...

文章 2024-01-09 来自:开发者社区

nginx日志模块 ngx_http_log_module

文档地址:https://nginx.org/en/docs/http/ngx_http_log_module.html 默认日志格式:

nginx日志模块 ngx_http_log_module
文章 2024-01-04 来自:开发者社区

node中的fs模块和http模块的学习

读取文件 fs 模块第1个参数就是要读取的文件路径 第2个参数是一个回调函数(error,data)=>{} error 如果读取失败,error 就是错误对象 如果读取成功,error 就是 nu1l data 如果读取成功,data 就是读取到的数据,输出来的是是16进制的数据,可以通过 data.toString() 转换一下 如果读取失败,data就是undefi...

node中的fs模块和http模块的学习
文章 2023-07-05 来自:开发者社区

【2022】Nginx目录索引模块ngx_http_autoindex_module

使用ngx_http_autoindex_module模块生成目录列表。通常,当ngx_http_index_module模块找不到索引文件时,会将请求传递给模块。比如我以下的例子,并没有创建index.html文件,如果没有开启autoindex功能,会返回403错误。该模块可以用于建立本地YUM仓库。首先创建一个站点文件:mirrors.yyang.com.confserver { li...

【2022】Nginx目录索引模块ngx_http_autoindex_module
文章 2023-04-16 来自:开发者社区

Node【五】内置模块 【http模块】

前言哈喽小伙伴们,新的专栏 Node 已开启;这个专栏里边会收录一些Node的基础知识和项目实战;今天我们开始这个专栏的第五篇文章,带领大家初识一下 Node内置模块 http 模块;让我们一起来看看吧http模块 1.引入http模块let http = require("http"); 2.创建服务let server = http.createServer(function(req,re.....

文章 2023-01-02 来自:开发者社区

手把手教你Nginx常用模块详解之ngx_http_status_module(十一)

本专栏非常感谢大家得关注和支持,本人开源项目站点https://erosbt.com 将自己热爱与信仰的技术,持续不辍地传递。Nginx专栏手把手教你Nginx常用模块详解之ngx_http_access_module(一)手把手教你Nginx常用模块详解之ngx_http_addition_module(二)手把手教你Nginx常用模块详解之ngx_http_api_module(三)手把手教....

文章 2023-01-02 来自:开发者社区

手把手教你Nginx常用模块详解之ngx_http_rewrite_module(十)

本专栏非常感谢大家得关注和支持,本人开源项目站点https://erosbt.com 将自己热爱与信仰的技术,持续不辍地传递。Nginx专栏手把手教你Nginx常用模块详解之ngx_http_access_module(一)手把手教你Nginx常用模块详解之ngx_http_addition_module(二)手把手教你Nginx常用模块详解之ngx_http_api_module(三)手把手教....

文章 2023-01-02 来自:开发者社区

手把手教你Nginx常用模块详解之ngx_http_perl_module(九)

本专栏非常感谢大家得关注和支持,本人开源项目站点https://erosbt.com 将自己热爱与信仰的技术,持续不辍地传递。Nginx专栏手把手教你Nginx常用模块详解之ngx_http_access_module(一)手把手教你Nginx常用模块详解之ngx_http_addition_module(二)手把手教你Nginx常用模块详解之ngx_http_api_module(三)手把手教....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"从 HTTP 到 HTTPS 让网站更安全","productDescription":"本方案介绍如何在ECS上搭建Web应用以及在Nginx服务器上部署SSL证书开启HTTPS安全访问。","productContentLink":"https://www.aliyun.com/solution/tech-solution/ssl","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/ssl"},"productButton2":{"productButtonText":"方案部署","productButtonLink":"https://help.aliyun.com/document_detail/2684684.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"通过弹性公网IP确保服务迁移时公网IP不变","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/eip_service","productPromotionInfoSecondText":"网站静态资源访问加速","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/oss-x-cdn"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}