request.body , 请求的原始内容,post方式放在body中的。

request.arguments, body参数和url参数的统一体, 同时也是经过“加工”,解码的。

eg.在对接其他平台时,对方可能post过来的body内容是这样的:

———————————————2b556c28ca53
Content-Disposition: form-data; name="order_number" LT40OQ95A5N67
———————————————2b556c28ca53
Content-Disposition: form-data; name="shipping_status" 5
———————————————2b556c28ca53
Content-Disposition: form-data; name="shipping_status_desc" 充值失败
———————————————2b556c28ca53
Content-Disposition: form-data; name="shipping_status_message" ———————————————2b556c28ca53———————————————

这就是所谓的“原始内容”, 可以自己split。

然而更简单的方式是直接用request.arguments读取(以上内容可以很愉快的得到一个json字符串)。

转载请注明来源:http://www.cnblogs.com/Tommy-Yu/p/5715853.html

参考:http://stackoverflow.com/questions/34818996/tornado-what-is-the-difference-between-requesthandlers-get-argument-get-qu

tornado RequestHandler request.body & request.arguments的更多相关文章

  1. tornado requesthandler可以重写的方法

    一 :RequestHandler 一般我们继承tornado.web.RequestHandler 1,RequestHandler.initialize()一般用于初始化,第三个字典参数传入 cl ...

  2. String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";作用!!!!!

    <%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...

  3. C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法

    C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法? Request.params , Request ...

  4. basePath = request.getScheme()+"://"+request.getServerName()+":"+r

    basePath = request.getScheme()+"://"+request.getServerName()+":"+r (2014-06-30 1 ...

  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+pat----------<base>元素有关

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. ...

  6. request.get request.GET……

    发现他们是不同的. 报错: AttributeError at /add/ 'WSGIRequest' object has no attribute 'get' Request Method: GE ...

  7. 客户端的数据来源:QueryString, Form, Cookie Request[]与Request.Params[]

    在ASP.NET编程中,有三个比较常见的来自于客户端的数据来源:QueryString, Form, Cookie . 我们可以在HttpRequest中访问这三大对象. QueryString: 获 ...

  8. JSP之项目路径问题(${pageContext.request.contextPath},<%=request.getContextPath()%>以及绝对路径获取)

    本随笔这是作为一个记录使用,以备后查.项目完成之后本地部署OK,本地Linux部署OK,都可以正常的访问,可是当我把它部署到服务器上面的时候,首页可以正常访问,可是当发出请求的时候却报错误了,说找不到 ...

  9. 安卓开发笔记(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request

    当出现了'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request的错误的时候,实际上是我们在写代码的时候少打了 ...

  10. <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>

    <%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...

随机推荐

  1. window.onscroll页面滚动条滚动事件

    用途一:"返回顶部": window.onscroll = function(){ var t = document.documentElement.scrollTop || do ...

  2. jQuery 根据城市时区,选择对应的即时时间

    我们的CRM系统中,下面是用jQuery 做了个时区小插件 如图: // 时区城市//$(function(){//所有城市和时间静态输出//var cityID = 170; //中国,北京//va ...

  3. inline-block元素overflow:hidden对齐问题

    inline-block元素设置overflow:hidden后,其本身会上移 解决方法:在该元素或其父元素上设置vertical-align:bottom 原因解释:inline-block元素被设 ...

  4. c语言中time相关函数

    工作中遇到的函数: int seed = time(NULL); srand(seed); signal(SIGINT, stop); signal(SIGUSR1, sig_usr1); 搜time ...

  5. Apache ab参数--压力测试

    Apache附带的ab,它非常容易使用,ab可以直接在Web服务器本地发起测试请求.这至关重要,因为我们希望测试的服务器的处理时间,而不包含数据的网络传输时间以及用户PC本地的计算时间. 需要清楚的是 ...

  6. CF456C Boredom (DP)

    Boredom CF#260 div2 C. Boredom Codeforces Round #260 C. Boredom time limit per test 1 second memory ...

  7. iOS: ARC & MRC下string内存管理策略探究

    ARC & MRC下string内存管理策略探究 前两天跟同事争论一个关于NSString执行copy操作以后是否会发生变化,两个人整了半天,最后写代码验证了一下,发现原来NSString操作 ...

  8. 绿书模拟day10 单词前缀

    [题目描述]一组单词是安全的,当且仅当不存在一个单词是另一个单词的前缀,这样才能保证数据不容易被误解,现在你手上有一个单词集合s,你需要计算有多少个自己是安全的.注意空集永远是安全的.[输入格式]第一 ...

  9. 点击验证码刷新(tp3.1)--超简单

    省略js点击刷新验证码,虽然看不懂 <img src='http://localhost/app/index.php/Index/verify/'  onclick='this.src=this ...

  10. JVM性能调优监控工具jps、jstack、jmap、jhat、jstat使用详解(转VIII)

    JVM本身就是一个java进程,一个java程序运行在一个jvm进程中.多个java程序同时运行就会有多个jvm进程.一个jvm进程有多个线程至少有一个gc线程和一个用户线程. JDK本身提供了很多方 ...