ajaynegi45 / Http-Server

A lightweight, custom HTTP server built in Java that handles basic GET requests and supports multithreaded request handling. It’s easy to extend for additional HTTP methods and ideal for learning the fundamentals of server-side programming.
7 stars 15 forks source link

[FEATURE] Improve Support for HTTP Methods #3

Open ajaynegi45 opened 1 month ago

ajaynegi45 commented 1 month ago

Description:

Add support for other common HTTP methods such as POST, PUT, DELETE and more. This will allow the server to handle more complex interactions and provide more flexibility.

Suggested HTTP Methods to Implement:

OmPat1l commented 1 month ago

Hey there can you assign me this issue, I have decent experience around spring so would be able to do this https://www.linkedin.com/in/ompatil130503/

ajaynegi45 commented 1 month ago

Hey there can you assign me this issue, I have decent experience around spring so would be able to do this https://www.linkedin.com/in/ompatil130503/

Hi @OmPat1l ,

Thank you for expressing your interest in working on this issue. I'm glad to hear that you have experience with Spring! Before I assign the issue to you, could you please share your approach and how you plan to implement the support for these additional HTTP methods?

Looking forward to your response!

OmPat1l commented 1 month ago

I have debugged a bit to get through the intricacies of this repo, I would first suggest to change the file structure with controllers, data objects and services to use the MVC architecture as in a micro service ( a newer approach),

1) Right now the repo has a standard data type implemented for each route we have ( GET in this case ), we need to add generic data types to make this server usable 2) We need to specify the modules as of which param needs to be passed and what action needs to be taken ( I would like to hear more from you around this )

please specify what all routes needs to be added, usually we add a repository layer to commute between data type objects to allow basically any data base to be used with our server ( maybe we would need different PR for this)

ajaynegi45 commented 1 month ago

I have debugged a bit to get through the intricacies of this repo, I would first suggest to change the file structure with controllers, data objects and services to use the MVC architecture as in a micro service ( a newer approach),

  1. Right now the repo has a standard data type implemented for each route we have ( GET in this case ), we need to add generic data types to make this server usable
  2. We need to specify the modules as of which param needs to be passed and what action needs to be taken ( I would like to hear more from you around this )

please specify what all routes needs to be added, usually we add a repository layer to commute between data type objects to allow basically any data base to be used with our server ( maybe we would need different PR for this)

Hey @OmPat1l,

Thank you for diving into the project and sharing your thoughts! I understand the current structure might be a bit confusing, and your suggestions around using the MVC architecture and adding a repository layer for flexibility are interesting.

My goal for this project is to keep it lightweight, highly scalable, secure, and easily customizable. I want users to be able to add their own implementations or features without disrupting the existing codebase.

To achieve this, I think following the SOLID design principles would be a great step forward. This would help us maintain flexibility and extend the functionality while keeping the core lightweight. If you have any further thoughts on this or additional suggestions, I’d love to discuss them in more detail.

Looking forward to collaborating with you!

Pranav014 commented 1 month ago

Hi @ajaynegi45 , I would like to be assigned this issue if this is still open. I see that previously there was a merge. So does the requirement apply for neww http methods or has this issue been closed entirely?

ajaynegi45 commented 1 month ago

Hi @ajaynegi45 , I would like to be assigned this issue if this is still open. I see that previously there was a merge. So does the requirement apply for neww http methods or has this issue been closed entirely?

Hi @Pranav014,

Thank you for expressing your interest in working on this issue. I'm delighted to inform you that I have assigned this issue to you. Your willingness to contribute to our project is much appreciated. Issue is about to improve the support of existing method and add new method.

Before making any contributions, please read the Readme.md file carefully to better understand the project's goals and purpose. This will give you clarity on our mission. Also, make sure to review the Contributing.md file, which contains important guidelines to make the contribution process smoother, especially for newcomers.

Feel free to start working, and if you have any questions or need assistance during the process, please don't hesitate to reach out.