WireMock Stubbing using a JSON File - Multiples Cookies in Response

267 views
Skip to first unread message

jainebri

unread,
Sep 21, 2018, 11:36:12 AM9/21/18
to wiremock-user
Hi.

I do not find in the WireMock documentation how to specify multiple cookies as part of the response in a JSON file.

I'm mocking an Angular Application that makes an exhaustive use of cookies.

I have tried Set-Cookie and It does not work.

Kind regards,

Jaider.

Tom Akehurst

unread,
Sep 21, 2018, 12:01:39 PM9/21/18
to wiremock-user
There's no special syntax in WireMock for this. It's just a response header e.g.

{

  "request": {

    "url": "/thing",

    "method": "ANY"

  },


  "response": {

    "status": 200,

    "headers": {

      "Set-Cookie": ['one=123;','two=234;']

    },

    "body": "Body text"

Reply all
Reply to author
Forward
0 new messages