Giter Club home page Giter Club logo

Comments (6)

ijpiantanida avatar ijpiantanida commented on July 19, 2024 1

In res there should only be one Set-Cookies header with all the values in the array.

{
  "meta": {
    "createdAt": "2018-05-09T07:48:08.621Z",
    "host": "https://abcdefgh.com",
    "reqHumanReadable": true
  },
  "req": {
    "url": "/v1",
    "method": "GET",
    "body": ""
  },
  "res": {
    "status": 200,
    "headers": {
      "Set-Cookies": [
        "123456789",
        "abcdefghij"
      ]
    },
    "body": ""
  }
}

from talkback.

ijpiantanida avatar ijpiantanida commented on July 19, 2024

Hi @tsts83. Can you please attach an example of the tape that you're generating?
I just tested a dummy example with multiple Set-Cookies in the response and it worked, so I might be missing something.

Thank you

from talkback.

tsts83 avatar tsts83 commented on July 19, 2024

Sure:
{ meta: { createdAt: "2018-05-09T07:48:08.621Z", host: "https://abcdefgh.com", reqHumanReadable: true }, req: { url: "/v1", method: "GET", body: "" }, res: { status: 200, headers: { "Set-Cookies": [ "123456789" ], "Set-Cookies": [ "abcdefghij" ] }, body: "" } }

Response header in browser:
HTTP/1.1 200 OK Set-Cookies: abcdefghij Date: Wed, 23 May 2018 08:27:23 GMT Connection: keep-alive Transfer-Encoding: chunked

from talkback.

tsts83 avatar tsts83 commented on July 19, 2024

Thanks! This is what I was looking for.

One last question. Is it possible to ignore query parameters when matching url?
E.g.: /v1/something.js?_=1527150278045 - so in this case ignore the number ( which is changing ) and use the tape based on the url only.

from talkback.

ijpiantanida avatar ijpiantanida commented on July 19, 2024

Glad it worked!

No, right now URLs have to be an exact match. I'll keep it in mind for a possible feature.

from talkback.

ijpiantanida avatar ijpiantanida commented on July 19, 2024

@tsts83 I just published v1.3.0 which adds the ignoreQueryParams option.
Hope it helps :)

from talkback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.