async 和 await Async/await 在 NodeJS 7.6 引入,当前已被所有现代浏览器支持。 简介 async/await 是一种新的使用异步代码的方式,代替之前回调或者 promise 的方式。 是基于 promise 的语法糖,无法在普通的回调函数中使用,await 必须在 ...
分类:
其他好文 时间:
2020-07-21 01:23:25
阅读次数:
76
1. urllib https://docs.python.org/zh-cn/3/library/urllib.request.html#module-urllib.request 2. BeautifulSoup https://www.crummy.com/software/Beautiful ...
分类:
其他好文 时间:
2020-07-21 01:10:58
阅读次数:
71
1 自定制频率 # 自定制频率类,需要写两个方法 -# 判断是否限次:没有限次可以请求True,限次了不可以请求False def allow_request(self, request, view): -# 限次后调用,显示还需等待多长时间才能再访问,返回等待的时间seconds def wait ...
分类:
其他好文 时间:
2020-07-20 15:39:52
阅读次数:
94
Nginx server { listen 80; server_name xx.xxxx.com; return 301 https://$server_name$request_uri; } ...
分类:
Web程序 时间:
2020-07-20 13:15:37
阅读次数:
77
/** Axios请求 * @Author: xuhong * @Date: 2020/6/19 * @DESC: //TODO */ import axios from 'axios'; import baseUrl from "./config"; import {Message} from ' ...
分类:
移动开发 时间:
2020-07-20 13:13:37
阅读次数:
127
/** 请求 * @Author: xuhong * @Date: 2020/6/19 * @DESC: //TODO */ /** * 发送请求,处理请求失败 * * request(url, method, data, callback) * request(url, method, callb ...
分类:
Web程序 时间:
2020-07-20 13:11:43
阅读次数:
82
javaweb上传文件 上传文件的jsp中的部分 上传文件同样可以使用form表单向后端发请求,也可以使用 ajax向后端发请求 1. 通过form表单向后端发送请求 <form id="postForm" action="${pageContext.request.contextPath}/Upl ...
分类:
Web程序 时间:
2020-07-20 13:09:58
阅读次数:
80
爬虫步骤 确定爬取目标的url 使用python代码发送请求获取数据 解析获取到的数据(精确数据) 找到新的目标(新的url)回到第一步,再次获取 -- 自动化 数据持久化 python3(原生提供的模板):urllibb.request urlopen 返回response对象 response. ...
分类:
其他好文 时间:
2020-07-20 10:42:59
阅读次数:
88
授权过滤器 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Http; using System.Web.Http.Controllers; u ...
分类:
Web程序 时间:
2020-07-20 10:40:40
阅读次数:
85
####报文格式 {"name":"文件名","out":"文件字节码"} ####通过接口下载远程文件 public void downloadFrom(HttpServletResponse res, HttpServletRequest request, Integer id) throws ...
分类:
Web程序 时间:
2020-07-20 10:31:48
阅读次数:
106