Giter VIP home page Giter VIP logo

cl-http-methodsandstatuscodes's Introduction

Methods and Status Codes Lab

Description

In this lab we have the incomplete getJavalinInstance() method that creates a Javalin object, sets up an endpoint, and returns the Javalin object. Your goal is to finish the method by setting up its remaining endpoints as well as their associated handlers.

An example of an endpoint and a handler are provided in the code.

Completing the Lab

You will be editing the file Endpoints.java. It can be found under the src/main/java/com/revature package.

Review the file's code and code comments. Look for TODO comments: these comments represent the tasks you need to perform to complete the lab. You can find a list of the TODOs in VSCode's Problems pane. To open up the Problems pane, go to View > Problems or use the shortcut "Ctrl + Shift + M" (or "Command + Shift + M" on Mac). We suggest you remove the TODOs as you complete them.

Tasks to Complete:

  • Create the POST endpoint to the "/post-request" path and associate it with the handler method you will create named handlePostRequest
  • Create the PUT endpoint to the "/put-request" path and associate it with the handler method you will create named handlePutRequest
  • Create the DELETE endpoint to the "/delete-request" path and associate it with the handler method you will create named handleDeleteRequest
  • Create the PATCH endpoint to the "/patch-request" path and associate it with the handler method you will create named handlePatchRequest
  • Create the POST endpoint's related handler based off of its description
  • Create the PUT endpoint's related handler based off of its description
  • Create the DELETE endpoint's related handler based off of its description
  • Create the PATCH endpoint's related handler based off of its description

Running Tests

  • To run the tests, click on the test beaker icon and run the test cases. Please ensure that you do not already have the program running.
  • You can optionally run the program for manual testing. Once the program is running, you can create a new terminal and execute the commands mentioned in the Main.java file.

You can create a new terminal using the button found in the bottom pane: new terminal button

Below is an example of manually testing using commands in the terminal: example manual testing image

Note: To see the above image(s), please open this file in Preview mode by using the Ctrl + Shift + V shortcut (Command + Shift + V on Mac)

cl-http-methodsandstatuscodes's People

Contributors

revathi-kamineni avatar cynthia-enciso avatar

Watchers

Nickolas Jurczak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.