浏览目录 概述 简单的视图 HttpRequest对象 CBV和FBV 给视图加装饰器 Request对象 Response对象 JsonResponse对象 Django shortcut functions CBV和FBV 给视图加装饰器 Request对象 Response对象 JsonRes ...
分类:
其他好文 时间:
2018-04-14 13:50:24
阅读次数:
1213
1、servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器解析url并根据web.xml找到相对应的servlet,并将request、response对象传递给找到的servlet,servlet根据request就可以知道是谁发出的请求,请 ...
分类:
编程语言 时间:
2018-04-13 17:48:45
阅读次数:
212
【0】README 0.0)本文部分文字描写叙述转自:“深入剖析tomcat”,旨在学习 tomcat(5)servlet容器 的基础知识。 0.1)intro to servlet容器:servlet容器是用来处理请求servlet资源,并为web客户端填充response 对象的模块; 0.2) ...
分类:
其他好文 时间:
2018-04-13 16:19:07
阅读次数:
220
前言 在使用tomcat时,经常会遇到连接数、线程数之类的配置问题,要真正理解这些概念,必须先了解Tomcat的连接器(Connector)。 在前面的文章 详解Tomcat配置文件server.xml 中写到过:Connector的主要功能,是接收连接请求,创建Request和Response对象 ...
分类:
编程语言 时间:
2018-04-02 13:42:49
阅读次数:
189
http请求中产生的两个核心对象: http请求: http响应: 所在位置: HttpRequest 对象的属性和方法: : 请求页面的全路径,不包括域名; : 请求中使用的HTTP方法的字符串表示(全大写表示,例如:GET,POST); : 包含所有HTTP GET参数的类字典对象; : 包含所 ...
分类:
其他好文 时间:
2018-04-01 16:32:03
阅读次数:
182
1.利用requests.get(url)获取网页页面的html文件 import requests newsurl='http://news.gzcc.cn/html/xiaoyuanxinwen/' res = requests.get(newsurl) #返回response对象 res.en ...
分类:
其他好文 时间:
2018-03-30 23:12:06
阅读次数:
229
一、安装 Requests 通过pip安装 或者,下载代码后安装: response对象属性: r.status_code #响应状态码r.raw #返回原始响应体,也就是 urllib 的 response 对象,使用 r.raw.read() 读取r.content #字节方式的响应体,会自动为 ...
分类:
其他好文 时间:
2018-03-30 14:08:28
阅读次数:
147
import requests newsurl = 'http://localhost:63342/bd/aaa.html?_ijt=7pd1hi6n7j1ue90de4jivbr31k' res = requests.get(newsurl) # 返回response对象 res.encoding... ...
分类:
其他好文 时间:
2018-03-29 22:42:13
阅读次数:
198
import requests newsurl = 'http://localhost:56341/bd/123.html?_ijt=7pd1hi6n7j1ue90de4jivbr31k' res = requests.get(newsurl) # 返回response对象 res.encoding... ...
分类:
其他好文 时间:
2018-03-29 22:41:53
阅读次数:
215
1.利用requests.get(url)获取网页页面的html文件 import requests newsurl='http://news.gzcc.cn/html/xiaoyuanxinwen/' res = requests.get(newsurl) #返回response对象 res.en ...
分类:
其他好文 时间:
2018-03-29 22:41:28
阅读次数:
216