Search code examples
restgoogle-chromegoogle-chrome-devtoolsweb-api-testingchrome-dev-editor

REST API Testing: How to get response using Google Chrome developer tools?


I'm very new to API testing.

I'm trying to make use of Google Chrome's developer tools to understand and explore this subject.

Question 1:
Is it possible to get the response (possibly in JSON format) of a simple GET request using chrome developer tools?

What I'm currently doing is:

  • Open chrome developer tools
  • Go to Network tab
  • Clear existing logs
  • Send a post request simply by hitting a URL. e.g. https://stackoverflow.com/questions/ask
  • Check the corresponding docs loaded enter image description here

    Question 2:
    What are the relevance "Reponse Headers" shown on the image above? I mean, am I correct to think that this is the response I am getting after doing the GET request?

    Any help or references you can give are much appreciated!


  • Solution

  • To answer your questions narrowly:

    Is it possible to get the response (possibly in JSON format) of a simple GET request using chrome developer tools?

    Yes! Just click the Response tab, which is to the right of the Headers tab that's open in your screenshot.

    What are the relevance "Reponse Headers" shown on the image above? I mean, am I correct to think that this is the response I am getting after doing the GET request?

    Yes, these are the HTTP headers that were sent with the response to your request.

    The broader question here is "how do I test a REST API?" DevTools is good for manual testing, but there are automated tools that can make it more efficient. I'll leave that up to you to learn more about that broad topic.