question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expect multiple possible status code values

See original GitHub issue

When testing POST operations against a service that performs de-duping, it’s common that I need to test for either 201 or 302 status codes.

It seems like it’d be easy to support in the code.

Here’s what I’d like to do:

.expect([201,302])

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:26
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jderijkecommented, Mar 11, 2020

this one received 14 thumbs up. i can’t see the dates on these, but the too-old label should be based on the last thumbs-up rather than the date this was requested

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expect multiple possible status code values #389 - GitHub
When testing POST operations against a service that performs de-duping, it's common that I need to test for either 201 or 302 status...
Read more >
How to test for multiple acceptable status codes in Postman?
In the test snippets, there is a test that would assert one status code: pm.test("Status code is 200", function () { pm.response ...
Read more >
What HTTP status code to return if multiple actions finish with ...
A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
Read more >
300 Multiple Choices - HTTP - MDN Web Docs - Mozilla
The HTTP 300 Multiple Choices redirect status response code indicates that the request has more than one possible responses.
Read more >
HTTP Status Codes: All 63 explained - including FAQ & Video
The differences in classes are indicated through the first digit of the error code, for example: just like a 404, any other 4xx...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found