Skip to content

Instantly share code, notes, and snippets.

@jw56578
Last active April 1, 2023 12:55
Show Gist options
  • Save jw56578/a8f8f665b8464987b3eb20c3d6a9b5b2 to your computer and use it in GitHub Desktop.
Save jw56578/a8f8f665b8464987b3eb20c3d6a9b5b2 to your computer and use it in GitHub Desktop.
Http Practice

Let's practice our ability to construct http message. Use postman to build and send the correct message to the server in order to receive the desired response. Send the following messages to the below server and record what is in the response message body and status code. Make sure you do not recieve the status code 400

https://GlaringTreasuredForce--jw56578.repl.co

Message 1.

  • method should be GET and path should be /products

Message 2.

  • method DELETE and path /products/1

Message 3.

  • method GET and path /products
  • Inclue a header, authorized=true

Message 4.

  • method POST and path /products
  • Inclue a body in JSON format, {"name":"bike"}
  • Inclue a header, Content-Type=application/json

Message 5.

What http method asks for a response identical to that of a GET request, but without the response body?

  • make a GET request put the answer in the path

Message 6.

Who created Nodejs?

  • make a GET request put their first name in the path /firstname
  • include a header, lastname = their last name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment