{"action":"closed","issue":{"url":"https://api.github.com/repos/YMFE/yapi/issues/186","repository_url":"https://api.github.com/repos/YMFE/yapi","labels_url":"https://api.github.com/repos/YMFE/yapi/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/YMFE/yapi/issues/186/comments","events_url":"https://api.github.com/repos/YMFE/yapi/issues/186/events","html_url":"https://github.com/YMFE/yapi/issues/186","id":306119760,"number":186,"title":"设置>请求配置>Pre-request Script(请求参数处理脚本) 中，使用context.method无法获取到请求方法","user":{"login":"xyuanzhi1983","id":37462753,"avatar_url":"https://avatars3.githubusercontent.com/u/37462753?v=4","gravatar_id":"","url":"https://api.github.com/users/xyuanzhi1983","html_url":"https://github.com/xyuanzhi1983","followers_url":"https://api.github.com/users/xyuanzhi1983/followers","following_url":"https://api.github.com/users/xyuanzhi1983/following{/other_user}","gists_url":"https://api.github.com/users/xyuanzhi1983/gists{/gist_id}","starred_url":"https://api.github.com/users/xyuanzhi1983/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xyuanzhi1983/subscriptions","organizations_url":"https://api.github.com/users/xyuanzhi1983/orgs","repos_url":"https://api.github.com/users/xyuanzhi1983/repos","events_url":"https://api.github.com/users/xyuanzhi1983/events{/privacy}","received_events_url":"https://api.github.com/users/xyuanzhi1983/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-17T02:05:26Z","updated_at":"2018-03-22T08:11:54Z","closed_at":"2018-03-22T08:11:54Z","author_association":"NONE","body":"## 版本号\r\n~ \r\n\r\n## 什么问题\r\n设置>请求配置>Pre-request Script(请求参数处理脚本) 中，使用context.method无法获取到请求方法\r\n\r\n## 如何复现此问题\r\n在请求参数处理脚本的输入框中输入如下js代码：\r\nvar test = \"\";\r\nfor(var a in context) {\r\n    test = test + \"(\" + a + \",\" + context[a] + \")\";\r\n}\r\ncontext.requestHeader.Authorization = test;\r\n\r\n然后请求，看到Authorization字段的为\r\nAuthorization:(pathname,/p/xxxxxx)(query,[object Object])(requestHeader,[object Object])(requestBody,[object Object])(utils,[object Object])\r\n里面没有\"method\"字段，与yapi的文档不符\r\n\r\n## 什么浏览器\r\nChrome\r\n\r\n## 什么系统（linux, window, macox）\r\nmacox\r\n"}}
{"actor":{"display_login":"suxiaoxin"}}