post

接收微信参数

做~自己de王妃 提交于 2020-02-07 17:01:58
$postXml = $GLOBALS["HTTP_RAW_POST_DATA"]; //接收微信参数 // 接受不到参数可以使用 file_get_contents("php://input");     //PHP 高版本中$GLOBALS["HTTP_RAW_POST_DATA"] 好像已经被废弃了 来源: https://www.cnblogs.com/dayin1/p/12273107.html

Less42-Less45(post型)

谁说我不能喝 提交于 2020-02-07 16:06:02
less42: POST类型(注意:传参时候不能用--+ 要用#即%23)使用''包裹 我们可以看到password没有经过mysqli_real_escape_string()函数进行处理,所以这个时候我们在这个位置进行构造 Admin admin 登录 a a';create table gxy42 like users;insert into gxy42 select *from users; # 虽然显示这个,但是我们看sql数据库,说明我们注入成功 Less43: 使用 (‘’) 包裹 其他与 第 42 关一致 通过查看login.php源码我们知道跟第42关区别就是用户名跟密码用(‘’)包裹,其余与第42关一样 a a');create table gxy43 like users;insert into gxy43 select *from users; # less-44: 使用 ’’ 包裹 其他与 第 42 关一致 没有回显信息 id=’1‘ password构造语句:a';create table gxy44 like users;insert into gxy44 select *from users; # less-45: 使用 (‘’) 包裹 其他与 第 42 关一致 没有回显信息 id=(’1‘) password构造语句:a');create

"ERROR" dispatch for POST "/error?userId=1", parameters={masked}

北城余情 提交于 2020-02-07 10:28:57
前言 错误信息 2020 - 01 - 10 08 : 41 : 13.827 DEBUG 12796 -- - [ gistrationTask1 ] o . s . web . client . RestTemplate : HTTP POST http : / / localhost : 9004 / instances 2020 - 01 - 10 08 : 41 : 13.827 DEBUG 12796 -- - [ gistrationTask1 ] o . s . web . client . RestTemplate : Accept = [ application / json , application /*+json] 2020-01-10 08:41:13.827 DEBUG 12796 --- [gistrationTask1] o.s.web.client.RestTemplate : Writing [Application(name=core-server-user, managementUrl=http://DESKTOP-SLABIS6:10002/actuator, healthUrl=http://DESKTOP-SLABIS6:10002/actuator/health, serviceUrl=http://DESKTOP-SLABIS6

获取 request 中用POST方式\"Content-type\"是\"application/x-www-form-urlencoded;charset=utf-8\"发送的 json 数据

与世无争的帅哥 提交于 2020-02-07 03:05:51
request中发送json数据用post方式发送Content-type用application/json;charset=utf-8方式发送的话,直接用springMVC的@RequestBody标签接收后面跟实体对象就行了,spring会帮你自动拼装成对象,如果 Content-type设置成application/x-www-form-urlencoded;charset=utf-8就不能用spring的东西了,只能以常规的方式获取json串了 方式一:通过流的方方式 import java.io.IOException; import javax.servlet.http.HttpServletRequest; /** * request 对象的相关操作 * @author zhangtengda * @version 1.0 * @created 2015年5月2日 下午8:25:43 */ public class GetRequestJsonUtils { /*** * 获取 request 中 json 字符串的内容 * * @param request * @return : <code>byte[]</code> * @throws IOException */ public static String getRequestJsonString

nodejs基础 -- express框架

自作多情 提交于 2020-02-07 02:25:53
Node.js Express 框架 Express 简介 Express 是一个简洁而灵活的 node.js Web应用框架, 提供了一系列强大特性帮助你创建各种 Web 应用,和丰富的 HTTP 工具。 使用 Express 可以快速地搭建一个完整功能的网站。 Express 框架核心特性: 可以设置中间件来响应 HTTP 请求。 定义了路由表用于执行不同的 HTTP 请求动作。 可以通过向模板传递参数来动态渲染 HTML 页面。 安装 Express 安装 Express 并将其保存到依赖列表中: $ npm install express --save 以上命令会将 Express 框架安装在当前目录的 node_modules 目录中, node_modules 目录下会自动创建 express 目录。 以下几个重要的模块是需要与 express 框架一起安装 的: body-parser - node.js 中间件,用于处理 JSON, Raw, Text 和 URL 编码的数据。 cookie-parser - 这就是一个解析Cookie的工具。通过req.cookies可以取到传过来的cookie,并把它们转成对象。 multer - node.js 中间件,用于处理 enctype="multipart/form-data"(设置表单的MIME编码)的表单数据。

post方式实现导出/下载文件

六月ゝ 毕业季﹏ 提交于 2020-02-07 02:25:30
项目需求: 前端需要传入过多的参数给后端,get地址栏不行,只能接受post方式去导出数据 1、get的下载方式 通常下载方式如下: let url = xxxx.action?a=xx&b=yy; window.location.href = url; // 或者 window.open(url, '_self') 弊端:当请求参数较多时,get的方式无法使用,这时候需要考虑post的方式,但是直接通过ajax的post的方式无法调用浏览器的下载功能 2、post的下载方式 原理: 创建一个隐藏form表单,通过form表单的提交刷新功能,实现下载。代码如下: // vue项目代码 // 导出excel postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址 var form = document.createElement("form"); form.style.display = "none"; form.action = url; form.method = "post"; document.body.appendChild(form); // 动态创建input并给value赋值 for (var key in params) { var input = document.createElement(

vue总结 06组件

喜你入骨 提交于 2020-02-07 01:09:28
组件基础 基本示例 这里有一个 Vue 组件的示例: // 定义一个名为 button-counter 的新组件Vue.component('button-counter', { data: function () { return { count: 0 } }, template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'}) 组件是可复用的 Vue 实例,且带有一个名字:在这个例子中是 <button-counter> 。我们可以在一个通过 new Vue 创建的 Vue 根实例中,把这个组件作为自定义元素来使用: <div id="components-demo"> <button-counter></button-counter></div> new Vue({ el: '#components-demo' }) You clicked me 0 times. 因为组件是可复用的 Vue 实例,所以它们与 new Vue 接收相同的选项,例如 data 、 computed 、 watch 、 methods 以及生命周期钩子等。仅有的例外是像 el 这样根实例特有的选项。 组件的复用 你可以将组件进行任意次数的复用: <div id="components-demo"

JS post提交表单

懵懂的女人 提交于 2020-02-07 01:04:15
js post方式提交表单有两种办法,1:AJAX提交 2:在JS里拼出一个form,然后submit 第二种办法的代码 Java代码 //这个主要是解决给password MD5 var email = 'email'; var pwd = 'password'; var postForm = document.createElement("form");//表单对象 postForm.method="post" ; postForm.action = 'login. jsp x' ; var emailInput = document.createElement("input") ; //email input emailInput.setAttribute("name", "email") ; emailInput.setAttribute("value", email); postForm.appendChild(emailInput) ; var pwdInput = document.createElement("input");// password input pwdInput.setAttribute("name","password"); pwdInput.setAttribute("value",pwd); postForm.appendChild

Django账户管理部分——登录与注册

安稳与你 提交于 2020-02-06 18:37:20
个人网站功能包括发表、存储个人文章,保存网络上的图片,展示图片,保存并展示个人视频。以下为网站的登陆注册部分。 上期文章: 个人网站开发前相关项目配置 用户登录验证 再网站开发中,用户登录验证的一个简单思路通常是将用户输入的信息与数据库中的信息比对,若一致则通过,反之,验证失败. 在本项目中,也采用这种验证方式。这里要用到数据库,Django默认采用自带的sqlite数据库,在这里无需对数据库做改动,若采用MySQL等其它数据库,需要对配置文件做些改动,这里不再详细描述。 django数据模型 这里可以将数据模型简单地理解为数据表,编写数据模型即设计数据库的表中有哪些内容,数据模型需要在应用中的models.py文件中编写。 下面为一个用户个人信息示例: class UserProfile ( models . Model ) : birth = models . DateTimeField ( max_length = 100 , blank = True ) phone = models . CharField ( max_length = 20 ) def __str__ ( self ) : return 'user {}' . format ( self . user . username ) 在这个模型中,包含了用户的’phone’,'birth’信息,由此可见

HTTP中POST方法和GET方法的区别

混江龙づ霸主 提交于 2020-02-06 16:56:49
最近在深入学习http协议类,对http请求中 post方法和 get方法 的区别 做一下总结记录: 1、get 在浏览器回退时是无害的,而post会再次提交请求; 2、get 产生的URL地址可以被收藏,而post不可以; 3、get请求会被浏览器主动缓存,而post不会主动缓存,除非手动设置; 4、get请求参数会被完整的保留在浏览器 历史记录中,而post不会; 5、get请求在url中传送的参数是有长度限制的,而post没有限制; 6、get请求只能进行URL编码,而post支持多种编码方式; 7、get请求的参数通过URL传递,而post 放在Request body中; 8、对参数的数据类型,get只接受ASCII字符,而post 没有限制; 9、get比post更不安全,因为get请求的参数直接显示在URL上, 明文的方式传递参数数据,所以不能用get方法传递敏感信息; 10、get是从服务器上获取数据,post是向服务器传送数据; 11、get方法传递的数据量较小,最大不超过2KB(因为受URL长度限制),post方法传递的数据量较大,一般不受限制; 12、get方法只会产生一个TCP数据包,浏览器会把Header和Data一并发送出去,服务器响应200(OK),并回传相应的数据。 而post方法会产生两个TCP数据包,浏览器会先将Header发送出去