{"action":"created","issue":{"url":"https://api.github.com/repos/tomakehurst/wiremock/issues/575","repository_url":"https://api.github.com/repos/tomakehurst/wiremock","labels_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/575/comments","events_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/575/events","html_url":"https://github.com/tomakehurst/wiremock/issues/575","id":201202528,"number":575,"title":"Question : is it possible to do bodyPatterns matching on just a regex ?","user":{"login":"StefH","id":249938,"avatar_url":"https://avatars.githubusercontent.com/u/249938?v=3","gravatar_id":"","url":"https://api.github.com/users/StefH","html_url":"https://github.com/StefH","followers_url":"https://api.github.com/users/StefH/followers","following_url":"https://api.github.com/users/StefH/following{/other_user}","gists_url":"https://api.github.com/users/StefH/gists{/gist_id}","starred_url":"https://api.github.com/users/StefH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefH/subscriptions","organizations_url":"https://api.github.com/users/StefH/orgs","repos_url":"https://api.github.com/users/StefH/repos","events_url":"https://api.github.com/users/StefH/events{/privacy}","received_events_url":"https://api.github.com/users/StefH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-17T08:15:41Z","updated_at":"2017-01-17T08:22:14Z","closed_at":null,"body":"I want to match a POST request with **application/x-www-form-urlencoded** data like:\r\n\r\n`grant_type=password&username=test&password=pwd`\r\n\r\nI tried:\r\n```js\r\n\"response\": {\r\n    \"status\": 200,\r\n    \"bodyPatterns\": [ {\r\n            \"matches\": \".username=(test)&.\"\r\n        }\r\n],\r\n. . .\r\n```\r\n\r\nBut I get a **500** error?\r\n\r\nIs it possible to just match on plain text ? (So no JSON and no XML) matching?\r\n\r\nSee also this http://stackoverflow.com/questions/41279540/request-body-matching-in-wiremock-not-json-xml"},"comment":{"url":"https://api.github.com/repos/tomakehurst/wiremock/issues/comments/273049993","html_url":"https://github.com/tomakehurst/wiremock/issues/575#issuecomment-273049993","issue_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/575","id":273049993,"user":{"login":"StefH","id":249938,"avatar_url":"https://avatars.githubusercontent.com/u/249938?v=3","gravatar_id":"","url":"https://api.github.com/users/StefH","html_url":"https://github.com/StefH","followers_url":"https://api.github.com/users/StefH/followers","following_url":"https://api.github.com/users/StefH/following{/other_user}","gists_url":"https://api.github.com/users/StefH/gists{/gist_id}","starred_url":"https://api.github.com/users/StefH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefH/subscriptions","organizations_url":"https://api.github.com/users/StefH/orgs","repos_url":"https://api.github.com/users/StefH/repos","events_url":"https://api.github.com/users/StefH/events{/privacy}","received_events_url":"https://api.github.com/users/StefH/received_events","type":"User","site_admin":false},"created_at":"2017-01-17T08:22:14Z","updated_at":"2017-01-17T08:22:14Z","body":"Sorry my bad, I  need to put the *bodyPatterns* in the request:\r\n\r\n```js\r\n{\r\n  \"request\": {\r\n  \"method\": \"POST\",\r\n    \"url\": \"/authorize/oauth2/token\",\r\n    \"bodyPatterns\": [ {\r\n          \"matches\": \".username=(test)&.\"\r\n      }\r\n    ]\r\n  },\r\n  \"response\": {\r\n    \"status\": 200,\r\n    . . .\r\n```"}}
{"actor":{"display_login":"StefH"}}