Skip to content

improve JS API to retrieve request and response #1962

@ptrthomas

Description

@ptrthomas

refer conversation here: #1861 (comment)

proposing the following for a start:

# get single header
* match karate.response.header('foo') == 'bar'

# get all header values by key
* match karate.response.headers('foo') == ['bar']

# same pattern for request
* match karate.request.header('foo') == 'bar'

# in future can add some helpers:
* match karate.response.body == 'success'
* match karate.request.method == 'PUT'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions