Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moco proxy playback seems doesn't work #234

Closed
xzywait opened this issue May 10, 2018 · 3 comments
Closed

moco proxy playback seems doesn't work #234

xzywait opened this issue May 10, 2018 · 3 comments

Comments

@xzywait
Copy link

xzywait commented May 10, 2018

I user this config.json below

config.json

[
    {
        "request": {
            "uri": "/test/123"
        },
        "response": {
            "json": {
                "data": "123"
            }
        }
    },
    {
        "request": {
            "uri":"/test/proxy"
        },
        "response": {
            "proxy": {
                "url": "http://localhost:12306/test/123",
                "playback": "playback.json"
            }
        }
    }
]

then I try curl -X GET http://localhost:12306/test/123
got response
{"data":"123"}

however then I try curl -X GET http://localhost:12306/test/proxy
got no response but playback.json seems out of expectation

[ {
  "request" : {
    "version" : "HTTP/1.1",
    "content" : "",
    "headers" : {
      "Host" : "localhost:12306",
      "User-Agent" : "curl/7.54.0",
      "Accept" : "*/*",
      "content-length" : "0"
    }, 
    "method" : "GET",
    "uri" : "/test/proxy"

It seems proxy playback doesn't work , did I make a mistake?

@xzywait
Copy link
Author

xzywait commented May 10, 2018

@dreamhead hope you could solve my confusion

@huangxd-
Copy link

@xzywait 请问有结论了吗?我也遇到了这个问题,想把请求和返回体录制下来

@dreamhead
Copy link
Owner

dreamhead commented Aug 19, 2018

It's definitely a bug. It takes me a long time to figure out how to fix it in 43919fc.

@xzywait @huangxd- Would you please help me to verify it in your environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants