Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for a Basic HTTP Router #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AnshumaliP
Copy link

Description

This PR adds support for a Basic HTTP Router.

The Main class shows a few examples.
The Request class represents an HTTP request and includes fields for the HTTP method, path, request body, and path parameters.
The Response class represents an HTTP response and includes fields for the response code and HTTP body.
The Router class has handlers for different HTTP methods and paths.
The RequestHandler interface defines a single method, handle(Request request), which is used to handle incoming HTTP requests and produce responses.

Testing

RouterTest has extensive unit test converage.

@dgs3 dgs3 self-assigned this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants