{"id":16228532,"url":"https://github.com/poppa/http-helpers-ts","last_synced_at":"2026-02-11T18:35:20.504Z","repository":{"id":57683442,"uuid":"470754159","full_name":"poppa/http-helpers-ts","owner":"poppa","description":"HTTP helper modules for Javascript/Typescript","archived":false,"fork":false,"pushed_at":"2024-10-02T06:09:13.000Z","size":885,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-02T17:55:28.398Z","etag":null,"topics":["http","http-constants","http-headers","http-helper","http-methods","http-status","http-status-code","https-status-codes","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poppa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-03-16T21:16:40.000Z","updated_at":"2024-10-02T06:09:16.000Z","dependencies_parsed_at":"2024-10-27T20:35:58.958Z","dependency_job_id":"a93cc3c5-8965-46d3-86f4-5e59344865a9","html_url":"https://github.com/poppa/http-helpers-ts","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":"0.021739130434782594","last_synced_commit":"852635a957711637387b4c2cbb22a50736bcfea6"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/poppa/http-helpers-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppa%2Fhttp-helpers-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppa%2Fhttp-helpers-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppa%2Fhttp-helpers-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppa%2Fhttp-helpers-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poppa","download_url":"https://codeload.github.com/poppa/http-helpers-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppa%2Fhttp-helpers-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29341265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T18:24:36.877Z","status":"ssl_error","status_checked_at":"2026-02-11T18:23:50.867Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-headers","http-helper","http-methods","http-status","http-status-code","https-status-codes","typescript"],"created_at":"2024-10-10T12:55:42.352Z","updated_at":"2026-02-11T18:35:20.488Z","avatar_url":"https://github.com/poppa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP helper modules for Javascript/Typescript\n\nThis repository currently contains two NPM packages for making it easier to\nmanage various HTTP-related programming tasks.\n\n## HTTP Constants _([@poppanator/http-constants](http-constants))_\n\nThis package contains constants such as HTTP status codes, status texts and\nheader names and a few utility function.\n\n```ts\nimport {\n  status,\n  header,\n  isSuccess,\n  isRedirect,\n} from '@poppanator/http-constants'\n\nconst res = await fetch('some-url', {\n  headers: {\n    [header.Connection]: 'keep-alive',\n    [header.ContentType]: 'application/json',\n  },\n})\n\n// Status is within the 200 range\nif (isSuccess(res.status)) {\n  if (res.status === status.Created) {\n    return {\n      status: status.PermanentRedirect,\n      location: res.headers[header.Location],\n    }\n  } else {\n    return {\n      status: status.Ok,\n    }\n  }\n}\n// Status is within the 300 range\nelse if (isRedirect(res.status)) {\n  const newLocation = res.headers[header.Location]\n  return {\n    status: status.TemporaryRedirect,\n    location: newLocation,\n  }\n} else {\n  // ... Something is bananas\n  return {\n    status: status.BadRequest, // 400\n  }\n}\n```\n\nFor more info, see the [README](http-constants/README.md)\n\n## HTTP Error _([@poppanator/http-error](http-error))_\n\nThis package contains a `Error` class representing a HTTP error:\n\n```ts\nimport { HttpError, resolveHttStatusCode } from '@poppanator/http-error'\n\ntry {\n  await callSomeHttpApiOrSomething()\n} catch (err: unknown) {\n  const status = resolveHttpStatusCode(err)\n\n  throw new HttpError(status ?? 500)\n}\n```\n\nFor more info, see the [README](http-error/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoppa%2Fhttp-helpers-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoppa%2Fhttp-helpers-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoppa%2Fhttp-helpers-ts/lists"}