application/x-www-form-urlencoded 如何转换为可视化格式?

抓包的请求体如何转换为可视化阅读?

图片描述

回答:

url转json

回答:

点右边的webforms
clipboard.png

回答:

decode
clipboard.png

回答:

复制你的完整url,使用这个方法能够直接转换了

String.prototype.parseURL = function() {

'use strict';

//url解析

var url = this.toString()

var a = document.createElement('a');

a.href = url;

return {

source: url,

protocol: a.protocol,

origin: a.origin,

hostname: a.hostname,

port: a.port,

search: a.search,

file: (a.pathname.match(/\/([^\/?#]+)$/i) || [, ''])[1],

hash: a.hash.replace('#', ''),

pathname: a.pathname.replace(/^([^\/])/, '/$1'),

relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1],

segments: a.pathname.replace(/^\//, '').split('/'),

params: (function() {

var ret = {};

var seg = a.search.replace(/^\?/, '').split('&').filter(function(v, i) {

if (v !== '' && v.indexOf('=')) {

return true;

}

});

for (var i = 0, element; element = seg[i++];) {

var idx = element.indexOf('=');

var key = element.substring(0, idx);

var val = element.substring(idx + 1);

ret[key] = val;

}

return ret

})()

}

};

'http://www.a.com/index.html?a=1&b=2'.parseURL().params//{a:1,b:2}

回答:

clipboard.png
xs.dznxznx

以上是 application/x-www-form-urlencoded 如何转换为可视化格式? 的全部内容, 来源链接: utcz.com/a/162948.html

回到顶部