最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Postman中如何查看http的请求和响应的原始内容

Postman crifan 2894浏览 0评论
折腾:
【已解决】PySpider中用Python代码爬取小花生app中绘本数据
期间,想要查看Postman发送的接口请求的request和response的原始内容
找了半天,貌似是:
View-》Show Postman Console
然后再去请求,好像console中会显示原始的请求内容
然后再去请求一次,果然可以在console中看到内容:
默认是Pretty格式化好的效果,很清楚,方便查看:
要想看原始内容,可以点击Raw切换到原始模式:
比如拷贝出的原始内容就是:
POST /Reading.svc/parentChildReadingBookQuery2
Content-Type: application/json
userId: 1134723
User-Agent: Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; A0001 Build/KOT49H) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Authorization: NSTp9~)NwSfrXp@\
timestamp: 1553675572
signature: d516df23120d3c9f0397475f03c61199
cache-control: no-cache
Postman-Token: f9de5b1d-54d4-4b7f-a2d4-bc756e518200
Accept: */*
Host: 
www.xiaohuasheng.cn:83
cookie: 
ASP.NET_SessionId=dxf3obxgn5t4w350xp3icgy0
accept-encoding: gzip, deflate
content-length: 202
{"J":"{\"userId\":\"1134723\",\"fieldName\":\"\",\"fieldValue\":\"全部类别\",\"theStageOfTheChild\":\"\",\"parentalEnglishLevel\":\"\",\"supportingResources\":\"\",\"offset\":0,\"limit\":10}","C":0}
HTTP/1.1 200
status: 200
Cache-Control: private
Content-Length: 1977
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: 
ASP.NET
Date: Wed, 27 Mar 2019 09:19:20 GMT
{"C":2,"J":"H4sIAAAAAAAEALWXW0\/bSBiG\/4qVm71hl9iOE6eXZdst2gNRaa9We+Em0+BtYiPb6RatKoUVpy4phFIOaaC0UA7tkhKWU44g9adUmbFz1b+wn+0QcrDZUqkSijyOM5553nnf7+PXPz3DDzzXOC\/T4wkPiRJS0R1RiyHPNQ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ihLQoz6AZlmGB4Sw9SPYkS1BEKKenUxaIZzFSPIucLvrAJOC7sRSYSt25eW6vaSQHOtXuGYTq\/4aXer4M1qfXSJTJyCMOZhL+\/i\/CxZOsbJTK3wlGRP4RiQlRKYgMxsGttbxlmGvDoBaSGLPlVGm\/7xcVyXUPqTLDnctPdLXs3hqdX68nG3PgOP7stKpBlZdxSEGm6hv2UvryMdGtmVxMvSUE2gVw3wnINZghfusIshma64VI7Gyu5KIkyuitoI5ClSHX3j0iGxwVZpeLYrxvwBdzOB3LhQwLNLZHfdOJuxy0WzYhtnWcCJx3fIYpG8vkgyX6C7dJsGS\/3Tuj1crJjGyea69ThPh+tiFHJMA2HCaNg8klc3ip929QnfEVq8e2jZV+B2Y3vDHJ8v8PO80p5q9cyYnWp93zeGkCXQCJDUJN6rtNegYJt41rBdvKDZ8boZa3zHLtSgmZlYuS3y6rXd7jYcsZAhq2nH0PN5u4sRqEVyqfraEfQL5PAl\/IEDHcSLCaoKOXIdSKvUH6I2BJ1\/DHWFnIOPWoqNZSM6AJ8sAy2x0798\/Bc3w31DYizyjUqFYsKIU79l6WLt091YDM+3t8GdbRgXuCTz8hP6xo7ddNUKMzZN43gDzx3UqvP1dyloDGqlVK1QqhWSnse\/\/Qe5xqWpdg8AAA==","M":"1001","ST":null}
【总结】
Postman中,想要查看某个请求和响应的http协议的原始内容:
  • 先要打开Postman Console
    • View-》Show Postman Console
  • 再去测试接口发送请求返回响应
    • 点击Send去测试接口
  • Postman Console中即可看到对应数据了
    • 默认Pretty模式,点击Raw可以切换看到原始字符串

转载请注明:在路上 » 【已解决】Postman中如何查看http的请求和响应的原始内容

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
80 queries in 0.183 seconds, using 22.08MB memory