Skip to content

如何通过插件修改http请求的body内容 #4

@bugVanisher

Description

@bugVanisher

背景

test-server插件演示了如何修改response(内容经过base64编码)内容,其中用到了client=req.request(),然后req.pipe(client)

期望

如何修改request对象本身,比如我的请求body里的json字符串用PB序列化了,正常情况下无法通过UI页面工具修改内容发起请求,而我期望在composer里面编辑json,然后想通过插件动态地把json字符串序列化为PB后请求真实服务器。需要怎么做?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions