Skip to content

feat: enable headers in pre-request scripting [INS-3379] #7121

Merged
jackkav merged 2 commits intodevelopfrom
pre-script-headers
Feb 29, 2024
Merged

feat: enable headers in pre-request scripting [INS-3379] #7121
jackkav merged 2 commits intodevelopfrom
pre-script-headers

Conversation

@ihexxa
Copy link
Contributor

@ihexxa ihexxa commented Feb 28, 2024

Changes:

  • enabled headers in pre-request scripting
  • added unit tests and smoke test

How to test:

Please run this script and check its output.

const { Header, HeaderList } = require('insomnia-collection');

const h1 = new Header({key: "X-Header-1", value: "1"});
const h2 = new Header({key: "X-Header-2", value: "2"});

const headerList = new HeaderList(Header, [h1]);
headerList.add(h2)

console.log(h1.toString());
console.log(headerList.all());

@ihexxa ihexxa force-pushed the pre-script-headers branch from 0cbccf8 to 0ccfd08 Compare February 28, 2024 08:09
@ihexxa ihexxa self-assigned this Feb 28, 2024
@ihexxa ihexxa changed the title chore: enabled headers in pre-request scripting [INS-3379] chore: enable headers in pre-request scripting [INS-3379] Feb 28, 2024
@ihexxa ihexxa changed the title chore: enable headers in pre-request scripting [INS-3379] feat: enable headers in pre-request scripting [INS-3379] Feb 28, 2024
@ihexxa ihexxa force-pushed the pre-script-headers branch from 0ccfd08 to a2d7ba2 Compare February 29, 2024 02:50
@ihexxa ihexxa force-pushed the pre-script-headers branch from a2d7ba2 to 1c3951d Compare February 29, 2024 02:55
@jackkav jackkav merged commit 46a7088 into develop Feb 29, 2024
@jackkav jackkav deleted the pre-script-headers branch February 29, 2024 13:29
jackkav added a commit to jackkav/insomnia that referenced this pull request Mar 13, 2024
* chore: enable Headers in pre-request scripting

* Update packages/insomnia/src/sdk/objects/__tests__/headers.test.ts

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants