25 26 27 28 status code challenges

25 26 27 28 status code challenges

HomeOther Content25 26 27 28 status code challenges
ChannelPublish DateThumbnail & View CountActions
Channel Avatar EvilTester - Software Testing2021-07-18 10:19:29 Thumbnail
430 Views
How to complete the status code challenges. Numbers 25, 26, 27, 28 which trigger the status codes 405, 500, 501 and 204.

These challenges were all so similar and fast to complete that we cover the solutions for them all together. They are all variants on existing requests and all use the same endpoint `/heartbeat`

Issue a DELETE request on the `/heartbeat` end point and receive 405 (Method Not Allowed)

Issue a PATCH request on the `/heartbeat` end point and receive 500 (internal server error)

Issue a TRACE request on the `/heartbeat` end point and receive 501 (Not Implemented)

– Trace is not a common verb so some tools may not implement it, in Insomnia you need to use the `Custom Method` to send it.

Issue a GET request on the `/heartbeat` end point and receive 204 when server is running

– The request should have an `X-CHALLENGER` header to track challenge completion

For a write up of this solution, check out the blog post:

https://eviltester.com/apichallenges/howto/25-26-27-28-status-codes-405-500-501-204

Find the API Challenges here:

https://eviltester.com/apichallenges

Remember to subscribe to this YouTube channel.

You can support me on Patreon https://patreon.com/eviltester (watch my videos ad free and receive extra content)

I blog at https://eviltester.com/blog

Learn more about my books and online training at:

– https://eviltester.com

Follow me on:

– https://twitter.com/eviltester
– https://instagram.com/eviltester
– https://facebook.com/eviltester

Please take the opportunity to connect and share this video with your friends and family if you find it useful.