Skip to content

Commit

Permalink
feat(PTK-3): Adding support for pm.response.headers.all(), version 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aegrey-sxf committed Mar 27, 2024
1 parent 8cebb39 commit eb51833
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/aegrey/postman-to-k6/compare/v1.8.7...HEAD)

## [1.9.1] - 2024-03-27

### Added

- Support for pm.response.headers.all() [#3](https://github.com/aegrey/postman-to-k6/issues/3)

## [1.9.0] - 2024-03-26

### Added
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# POSTMAN TO k6


This project is a friendly fork of [apideck-libraries/postman-to-k6](https://github.com/apideck-libraries/postman-to-k6) from the original [grafana/postman-to-k6](https://github.com/grafana/postman-to-k6), where I will focus on **building out new features not currently supported** alongside maintenance.
Due to the lack of feature support in the original library and the apideck fork, I have decided to build this out seperately as I require these features immediately in a project I'm working on. I will focus on **building out new features not currently supported** alongside maintenance

I have decided to build this out seperately as I require these features immediately in a project I'm working on.

<sup>This project is a friendly fork of [apideck-libraries/postman-to-k6](https://github.com/apideck-libraries/postman-to-k6) from the original [grafana/postman-to-k6](https://github.com/grafana/postman-to-k6).</sup>


#### Request a New Features
Open an issue with your feature request (must me something currently supported in postman) and I'll work on the requests with the most votes in order.
Expand Down Expand Up @@ -76,22 +78,22 @@ While possible to install globally, we recommend that you, if possible, add the
test project using:

```shell
$ npm install -D @apideck/postman-to-k6
$ npm install -D @aegrey/postman-to-k6
```

or using yarn...

```shell
$ yarn add @apideck/postman-to-k6
$ yarn add @aegrey/postman-to-k6
```

Note that this will require you to run the converter with `npx @apideck/postman-to-k6 your-postman-file` or, if you are
Note that this will require you to run the converter with `npx @aegrey/postman-to-k6 your-postman-file` or, if you are
using an older versions of npm, `./node_modules/.bin/postman-to-k6 your-postman-file`.

### Global Installation

```shell
$ npm install -g @apideck/postman-to-k6
$ npm install -g @aegrey/postman-to-k6
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion aegrey-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

By adding support for the
Postman [Response Data](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/#scripting-with-response-data)
has long been unsupported, despite it being a fairly straightforward change. v1.9.0 implements support for `pm.response.headers.get()`
has long been unsupported, despite it being a fairly straightforward change. v1.9.0 implements support for `pm.response.headers.get()` and `pm.response.headers.all()`

4 changes: 4 additions & 0 deletions lib/shim/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ const pm = Object.freeze({
const header = store.response.headers.cased[name];
return header ? header : null;
},
all() {
const headers = store.response.headers.cased;
return headers ? headers : null;
},
}),
get code() {
return store.response.code;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aegrey/postman-to-k6",
"version": "1.9.0",
"version": "1.9.1",
"description": "Convert a Postman collection to k6 JavaScript",
"keywords": [
"k6",
Expand Down

0 comments on commit eb51833

Please sign in to comment.