Replies: 1 comment
-
In this case I would just create two requests: one with valid auth data (and check status 200), and one without (and check for 401) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Say I have an API secured with basic auth and some credentials, set as environment variables. I want to test that an endpoint works when credentials are provided, and that it doesn't work when credentials are not provided.
How do I do this? I've tried a few approaches and none have had the results that I expected (actually, I was struggling to reason about some of them – I didn't find the JavaScript API Reference very clear).
I've tried:
and
Beta Was this translation helpful? Give feedback.
All reactions