{"action":"created","issue":{"url":"https://api.github.com/repos/jamesdbloom/mockserver/issues/496","repository_url":"https://api.github.com/repos/jamesdbloom/mockserver","labels_url":"https://api.github.com/repos/jamesdbloom/mockserver/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/jamesdbloom/mockserver/issues/496/comments","events_url":"https://api.github.com/repos/jamesdbloom/mockserver/issues/496/events","html_url":"https://github.com/jamesdbloom/mockserver/issues/496","id":336172913,"node_id":"MDU6SXNzdWUzMzYxNzI5MTM=","number":496,"title":"creating expectation cannot print HttpResponsebody","user":{"login":"slankka","id":8142133,"node_id":"MDQ6VXNlcjgxNDIxMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8142133?v=4","gravatar_id":"","url":"https://api.github.com/users/slankka","html_url":"https://github.com/slankka","followers_url":"https://api.github.com/users/slankka/followers","following_url":"https://api.github.com/users/slankka/following{/other_user}","gists_url":"https://api.github.com/users/slankka/gists{/gist_id}","starred_url":"https://api.github.com/users/slankka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slankka/subscriptions","organizations_url":"https://api.github.com/users/slankka/orgs","repos_url":"https://api.github.com/users/slankka/repos","events_url":"https://api.github.com/users/slankka/events{/privacy}","received_events_url":"https://api.github.com/users/slankka/received_events","type":"User","site_admin":false},"labels":[{"id":29788023,"node_id":"MDU6TGFiZWwyOTc4ODAyMw==","url":"https://api.github.com/repos/jamesdbloom/mockserver/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jamesdbloom/mockserver/milestones/8","html_url":"https://github.com/jamesdbloom/mockserver/milestone/8","labels_url":"https://api.github.com/repos/jamesdbloom/mockserver/milestones/8/labels","id":1070244,"node_id":"MDk6TWlsZXN0b25lMTA3MDI0NA==","number":8,"title":"5.5.0-RELEASE","description":"","creator":{"login":"jamesdbloom","id":733179,"node_id":"MDQ6VXNlcjczMzE3OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/733179?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesdbloom","html_url":"https://github.com/jamesdbloom","followers_url":"https://api.github.com/users/jamesdbloom/followers","following_url":"https://api.github.com/users/jamesdbloom/following{/other_user}","gists_url":"https://api.github.com/users/jamesdbloom/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesdbloom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesdbloom/subscriptions","organizations_url":"https://api.github.com/users/jamesdbloom/orgs","repos_url":"https://api.github.com/users/jamesdbloom/repos","events_url":"https://api.github.com/users/jamesdbloom/events{/privacy}","received_events_url":"https://api.github.com/users/jamesdbloom/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":22,"state":"open","created_at":"2015-04-16T07:35:22Z","updated_at":"2018-11-15T00:17:58Z","due_on":"2018-12-03T08:00:00Z","closed_at":null},"comments":1,"created_at":"2018-06-27T10:37:03Z","updated_at":"2018-11-15T00:17:58Z","closed_at":"2018-11-15T00:17:58Z","author_association":"NONE","body":"Hello, I am using the latest version : 5.4.1, I found there is a problem:\r\n \r\nPUT 127.0.0.1:8420/expectation\r\n```\r\n{\r\n\t\"httpRequest\": {\r\n\t\t\"path\": \"/somePath\",\r\n\t\t\"method\": \"POST\"\r\n\t},\r\n\r\n\t\"httpResponse\": {\r\n\t\t\"statusCode\": 201,\r\n\t\t\"headers\": [{\r\n\t\t\t\"name\": \"Content-Type\",\r\n\t\t\t\"values\": [\"x-www-form-urlencoded\"]\r\n\t\t}, {\r\n\t\t\t\"name\": \"Cache-Control\",\r\n\t\t\t\"values\": [\"no-cache, no-store\"]\r\n\t\t}],\r\n\t\t\"body\": {\r\n\t\t\t\"type\":\"PARAMETERS\",\r\n\t\t\t\"parameters\":[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\"name\": \"hello\",\r\n\t\t\t\t\t\t\"values\" : [\"HelloValue\"]\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t}\r\n\t\t\r\n\t}\r\n}\r\n```\r\n\r\nI can see the log:\r\n\r\n```\r\n18:27:18.343 [nioEventLoopGroup-3-1] INFO  org.mockserver.mock.HttpStateHandler - creating expectation:\r\n\r\n\t{\r\n\t  \"httpRequest\" : {\r\n\t    \"method\" : \"POST\",\r\n\t    \"path\" : \"/somePath\"\r\n\t  },\r\n\t  \"times\" : {\r\n\t    \"unlimited\" : true\r\n\t  },\r\n\t  \"timeToLive\" : {\r\n\t    \"unlimited\" : true\r\n\t  },\r\n\t  \"httpResponse\" : {\r\n\t    \"statusCode\" : 201,\r\n\t    \"headers\" : {\r\n\t      \"Content-Type\" : [ \"x-www-form-urlencoded\" ],\r\n\t      \"Cache-Control\" : [ \"no-cache, no-store\" ]\r\n\t    }\r\n\t  }\r\n\t}\r\n```\r\nthe parameters is gone. This is very misleading. I am sure that the parameters is added correctly.\r\n\r\n```\r\n//File: HttpStateHandler.java\r\n\r\nmockServerLogger.info(CREATED_EXPECTATION, expectation.getHttpRequest(), \"creating expectation:{}\", expectation.clone());\r\n//Add this line:\r\nmockServerLogger.info(CREATED_EXPECTATION,\"with HttpResponseBody inside:{}\", expectation.getHttpResponse().getBody());\r\n```\r\n\r\nThis will print the response below:\r\n```\r\n18:27:18.343 [nioEventLoopGroup-3-1] INFO  org.mockserver.mock.HttpStateHandler - with HttpResponseBody inside:\r\n\r\n\thello=HelloValue\r\n```\r\n\r\nI have been debuging for a long time, but I can't figure out why. \r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/jamesdbloom/mockserver/issues/comments/438867790","html_url":"https://github.com/jamesdbloom/mockserver/issues/496#issuecomment-438867790","issue_url":"https://api.github.com/repos/jamesdbloom/mockserver/issues/496","id":438867790,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODg2Nzc5MA==","user":{"login":"jamesdbloom","id":733179,"node_id":"MDQ6VXNlcjczMzE3OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/733179?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesdbloom","html_url":"https://github.com/jamesdbloom","followers_url":"https://api.github.com/users/jamesdbloom/followers","following_url":"https://api.github.com/users/jamesdbloom/following{/other_user}","gists_url":"https://api.github.com/users/jamesdbloom/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesdbloom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesdbloom/subscriptions","organizations_url":"https://api.github.com/users/jamesdbloom/orgs","repos_url":"https://api.github.com/users/jamesdbloom/repos","events_url":"https://api.github.com/users/jamesdbloom/events{/privacy}","received_events_url":"https://api.github.com/users/jamesdbloom/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T00:17:58Z","updated_at":"2018-11-15T00:17:58Z","author_association":"OWNER","body":"this has now been fixed"}}
{"actor":{"display_login":"jamesdbloom"}}