{"id":18943093,"url":"https://github.com/kimyu0218/custom-http","last_synced_at":"2026-03-25T02:30:17.821Z","repository":{"id":213381070,"uuid":"733974501","full_name":"kimyu0218/custom-http","owner":"kimyu0218","description":"Package that mimic the http module","archived":false,"fork":false,"pushed_at":"2023-12-26T16:29:51.000Z","size":775,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T23:42:23.307Z","etag":null,"topics":["http","http-constants","http-message","http-request","http-response"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@kimyu0218/custom-http","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kimyu0218.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-20T15:05:19.000Z","updated_at":"2024-01-13T07:04:08.000Z","dependencies_parsed_at":"2024-11-08T12:41:42.577Z","dependency_job_id":"14843598-60b2-47b3-8ed9-0872afc7fdc4","html_url":"https://github.com/kimyu0218/custom-http","commit_stats":null,"previous_names":["kimyu0218/custom-http"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimyu0218%2Fcustom-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimyu0218%2Fcustom-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimyu0218%2Fcustom-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimyu0218%2Fcustom-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kimyu0218","download_url":"https://codeload.github.com/kimyu0218/custom-http/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239942793,"owners_count":19722336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","http-constants","http-message","http-request","http-response"],"created_at":"2024-11-08T12:40:28.910Z","updated_at":"2026-03-25T02:30:17.732Z","avatar_url":"https://github.com/kimyu0218.png","language":"TypeScript","readme":"## Custom Http\n\n![npm](https://img.shields.io/npm/v/@kimyu0218/custom-http) ![npm](https://img.shields.io/npm/dt/@kimyu0218/custom-http)\n\n`custom-http` is **a lightweight package that imitates the core functionality of the http module**. It provides some essential classes and constants, making it easy to create HTTP servers and clients in your application.\n\n### Installation ⬇️\n\n```bash\nnpm i @kimyu0218/custom-http\n```\n\n### Classes 💫\n\n#### HttpRequest\n\nThe `HttpRequest` class represents the request made by the client. It provides various methods to access information about the request.\n\n```ts\nimport { HttpRequest } from '@kimyu0218/custom-http';\n...\nconst req: HttpRequest = new HttpRequest(data);\nconst path: string = req.getPath();\nconst method: string = req.getMethod();\n```\n\n#### HttpResponse\n\nThe `HttpResponse` class represents the response that the server sends back to the client. It provides methods to set response headers and body.\n\n```ts\nimport { HttpResponse } from '@kimyu0218/custom-http';\n...\nconst res: HttpResponse = new HttpResponse(socket);\nres.throwError(404).send();\n```\n\n### Constants 💫\n\n#### METHODS\n\nThe `METHODS` is an object containing HTTP methods.\n\n```ts\nimport { METHODS } from '@kimyu0218/custom-http';\n\nconsole.log(METHODS.GET); // GET\n```\n\n#### STATUS_CODES\n\nThe `STATUS_CODES` is an object containing HTTP status codes and their respective messages.\n\n```ts\nimport { STATUS_CODES } from '@kimyu0218/custom-http';\n\nconsole.log(STATUS_CODES[200]); // OK\n```\n\n#### CONTENT_TYPE\n\nThe `CONTENT_TYPE` is an object representing different content types. Each content type corresponds to a specific file extension.\n\n```ts\nimport { CONTENT_TYPE } from '@kimyu0218/custom-http';\n\nconsole.log(CONTENT_TYPE.HTML); // text/html\n```\n\n### Ongoing Development 🏃\n\nIt's important to note that this project is **still in development**. If you find any issues or have suggestions for improvements, feel free to open an issue.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimyu0218%2Fcustom-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkimyu0218%2Fcustom-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimyu0218%2Fcustom-http/lists"}