HTTP Client
Test HTTP requests and generate code examples in multiple languages
Quick Examples
Request
Code Examples
fetch("https://jsonplaceholder.typicode.com/posts/1", {
  method: "GET",
})
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.json();
  })
  .then(data => {
    console.log("Success:", data);
  })
  .catch(error => {
    console.error("Error:", error);
  });