当前位置:网站首页>URL模块
URL模块
2022-08-02 03:22:00 【cjx177187】
可以把url网址解析为一个对象
var url =require("url")
var urlobj=url.parse(req.url)
console.log(req.url)
req.url是什莫?
是前端发送过来的网址===>协议,网址,端口,pathname,querystring
我们要通过打印的这个网址来判断我们接下来的逻辑是都正确。
举例:

重点使用的是pathname ,前端发送网址我们就可以利用这个属性来获取网址中的路径来读取文件;还有qurey,可以用来获取数据,他将字符串截取变更保存到一个对象中,这对后序我们使用和修改这些数据提供了便利。
边栏推荐
- STM32 map文件解析
- A senior test engineer asked me these questions as soon as the interview came
- 每天填坑,精卫填坑第二集,TX1 配置从固态启动,安装Pytorch
- 【深度学习】从LeNet-5识别手写数字入门深度学习
- 通过PS 2021 将网页图标抠下来
- Mysql8创建用户以及赋权操作
- ModuleNotFoundError No module named ‘xxx‘可能的解决方案大全
- sh: 1: curl: not found
- MySQL分页查询的5种方法
- 磷脂-聚乙二醇-醛基 DSPE-PEG-Aldehyde DSPE-PEG-CHO MW:5000
猜你喜欢
![[详解C语言]一文带你玩转C语言小游戏---扫雷](/img/9f/3979ef063f10bd641111aa4f4d8b4e.png)
[详解C语言]一文带你玩转C语言小游戏---扫雷

新工程加载YOLOV6的预训练权重问题

MySQL分库分表

磷脂-聚乙二醇-巯基,DSPE-PEG-Thiol,DSPE-PEG-SH,MW:5000

ModuleNotFoundError No module named 'xxx' possible solutions

Amazon sellers how to improve the conversion

化学试剂磷脂-聚乙二醇-羟基,DSPE-PEG-OH,DSPE-PEG-Hydroxyl,MW:5000

kettle 安装与配置

The @autowired distinguished from @ the Resource

Knowledge Engineering Assignment 2: Introduction to Knowledge Engineering Related Fields
随机推荐
PCL—点云数据分割
mysql中如何查看表是否被锁
云服务器安装部署Nacos2.0.4版本
Basic usage of Monaco Editor
Redis简单学习笔记
Phospholipid-polyethylene glycol-thiol, DSPE-PEG-Thiol, DSPE-PEG-SH, MW: 5000
np.unique() function
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boo
cross-domain problem solving
DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified active group
Scientific research reagent DMPE-PEG-Mal dimyristoylphosphatidylethanolamine-polyethylene glycol-maleimide
Usage of JOIN in MySQL
ThunderBirde无法登录问题、pycharm调试一直收集数据、RuntimeError: CUDA error: device-side assert triggered等疑难杂症解决
【手把手带你学nRF52832/nRF52840 · (1)开发环境搭建】
SOCKS5
DSPE-PEG-Silane,DSPE-PEG-SIL,磷脂-聚乙二醇-硅烷修饰活性基团
MySQL8.0安装教程,在Linux环境安装MySQL8.0教程,最新教程 超详细
MySql创建数据表
化学试剂磷脂-聚乙二醇-羟基,DSPE-PEG-OH,DSPE-PEG-Hydroxyl,MW:5000
我的两周年创作纪念日