Skip to content

Java HTTP server implementation built without external libraries

Notifications You must be signed in to change notification settings

ujjwalgarg100204/http-server-using-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forks Stargazers LinkedIn


HTTP Server using Java

Java HTTP server implementation built without external libraries

Table of Contents
  1. About The Project
  2. Features
  3. Getting Started
  4. Usage
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

About The Project

This project aims to implement a basic HTTP server in Java without relying on any external libraries. It follows the HTTP protocol standards and provides features to handle incoming requests, generate responses, and manage concurrency using thread pools.

(back to top)

Built With

  • Java Socket API

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • Java Development Kit (JDK) installed
  • Java 21

Installation

  1. Clone the repo

    git clone https://github.com/ujjwalgarg100204/http-server-using-java.git
  2. Run the server

    mvnw exec:java

(back to top)

Usage

To start the server, run the following command:

mvnw exec:java

Once the server is running, you can use curl or any HTTP client to send requests to the server.

curl -v http://localhost:4221
curl -v http://localhost:4221/abcdefg
curl -v http://localhost:4221/echo/abc
curl -v --header "User-Agent: foobar/1.2.3" http://localhost:4221/user-agent
Server Client
server-recording client-recording

(back to top)

Contact

Your Name - @ujjwalgarg100204 - ujjwalgarg100204@gmail.com

Project Link: https://github.com/ujjwalgarg100204/http-server-using-java

(back to top)

Acknowledgments

  • CodeCrafters for providing the challenge and inspiration to create this project.
  • MDN Web Docs for reference to HTTP standards.

(back to top)

About

Java HTTP server implementation built without external libraries

Topics

Resources

Stars

Watchers

Forks

Languages