Skip to main content

Jan 24, 2021 - 2 minute read - API Testing API Challenges Evil Tester

How To - HEAD todos 200

This post and video shows how to complete the challenge HEAD /todos (200) using Insomnia.

What are the API Challenges?

Our API Challenges Application has a fully functional cloud hosted API, and a set of challenges to work through.

HEAD /todos (200)

Issue a HEAD request on the /todos end point

  • HEAD request is basically a GET but doesn’t return the body
  • Use it to ‘ping’ an end point and see if it exists, or to check the Headers are working correctly
  • Usually returns a 200 (if it exists) or a 404 (if it doesn’t exist)

Basic Instructions

  • Issue a HEAD request to end point “/todos”
    • if running locally that would be
      • http://localhost:4567/todos
    • if running in the cloud that would be
      • https://apichallenges.herokuapp.com/todos
  • The request should have an X-CHALLENGER header to track challenge completion
  • The response status code should be 200 because the end point exists
  • Compare the response with the response from GET /todos

Insomnia Details

> HEAD /todos HTTP/1.1
> Host: apichallenges.herokuapp.com
> User-Agent: insomnia/2020.3.3
> X-CHALLENGER: x-challenger-guid
> Accept: */*
< HTTP/1.1 200 OK
< Connection: keep-alive
< Date: Thu, 27 Aug 2020 14:09:19 GMT
< Content-Type: application/json
< X-Challenger: x-challenger-guid
< Server: Jetty(9.4.z-SNAPSHOT)
< Via: 1.1 vegur

Overview Video

Watch on YouTube

Patreon ad free version

Learn More and Start Testing


You will need a Github account to comment. Or you can contact me with your comment.

I reserve the right to delete spam comments e.g. if your comment adds no value and its purpose is simply to create a backlink to another site offering training, or courses, etc.