{"id":16542560,"url":"https://github.com/tada5hi/hapic","last_synced_at":"2026-02-25T12:25:00.615Z","repository":{"id":54595124,"uuid":"521173355","full_name":"tada5hi/hapic","owner":"tada5hi","description":"A tiny \u0026 simple fetch based http client with a collection of different presets.","archived":false,"fork":false,"pushed_at":"2024-05-01T00:09:43.000Z","size":10734,"stargazers_count":4,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T16:49:02.733Z","etag":null,"topics":["api","api-client","client","fetch","fetch-api","harbor","harbor-client","http","oauth2","oauth2-client","rest","vault","vault-client"],"latest_commit_sha":null,"homepage":"https://hapic.tada5hi.net/","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/tada5hi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["tada5hi"]}},"created_at":"2022-08-04T07:49:21.000Z","updated_at":"2024-05-06T01:40:11.685Z","dependencies_parsed_at":"2023-12-09T19:30:42.678Z","dependency_job_id":"88213fb4-e40b-484f-aa49-987071faae4a","html_url":"https://github.com/tada5hi/hapic","commit_stats":{"total_commits":189,"total_committers":2,"mean_commits":94.5,"dds":0.2698412698412699,"last_synced_commit":"7cd50dfabfdb7d16fdf6a652e71d79a75ffc2ee0"},"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada5hi%2Fhapic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada5hi%2Fhapic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada5hi%2Fhapic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada5hi%2Fhapic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tada5hi","download_url":"https://codeload.github.com/tada5hi/hapic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826797,"owners_count":20354221,"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":["api","api-client","client","fetch","fetch-api","harbor","harbor-client","http","oauth2","oauth2-client","rest","vault","vault-client"],"created_at":"2024-10-11T18:57:55.942Z","updated_at":"2026-02-25T12:25:00.603Z","avatar_url":"https://github.com/tada5hi.png","language":"TypeScript","funding_links":["https://github.com/sponsors/tada5hi"],"categories":[],"sub_categories":[],"readme":"# HAPIC 🌐\n\n[![main](https://github.com/Tada5hi/hapic/actions/workflows/main.yml/badge.svg)](https://github.com/Tada5hi/hapic/actions/workflows/main.yml)\n[![Known Vulnerabilities](https://snyk.io/test/github/Tada5hi/hapic/badge.svg)](https://snyk.io/test/github/Tada5hi/hapic)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits\u0026logoColor=white)](https://conventionalcommits.org)\n\n## What is it?\n\"**H**TTP **API** **C**lient\" is a tiny \u0026 simple fetch based http client.\nIt provides a convenient way to make HTTP requests.\n\n**Table of Contents**\n\n- [Features](#features)\n- [Documentation](#documentation)\n- [Packages](#packages)\n    - [Base](#base-)\n    - [Harbor](#harbor-)\n    - [Loki](#loki-)\n    - [OAuth2](#oauth2-)\n    - [Vault](#vault-)\n    - [VictoriaLogs](#victorialogs-)\n- [License](#license)\n\n## Features\n\n- ✨ Simple API\n- 🔄 Transform request payload \u0026 headers\n- 🛑 Hooks to intercept request and response \n- 🌐 Works in Node.Js, browser \u0026 workers environment\n- ❌ Throws an error on responses with a non 2xx status code\n- 🚀 Method shortcuts for GET, POST, PUT, ...\n- ⚙️ Extended options (e.g. baseURL)\n- 🎭 Proxy support\n\n## Documentation\n\nTo read the docs, visit [https://hapic.tada5hi.net](https://hapic.tada5hi.net)\n\n## Usage\n\nThe following code snippet should serve as a simple example and first impression.\n\n```typescript\nimport hapic from 'hapic';\n\nconst response = await hapic.post('https://example.com/users', {\n    firstName: 'Max',\n    lastName: 'Mustermann'\n});\n\nconsole.log(response);\n// { data: xxx, headers: xxx, status: xxx, statusText: xxx }\n```\n\n\n## Packages\nThe repository contains the following packages:\n\n### Base 🚀\n\n**`hapic`**\n\nThis package contains a HTTP-Client based on fetch.\nIT provides a convenient way to make HTTP requests.\n\nThe client is extended by the [Harbor](#harbor-), [Vault](#vault-), and [OAuth2](#oauth2-) clients, \nwhich provide additional functionality specific to those services.\n\n[Documentation](./packages/client)\n\n### Harbor 🚢\n\n**`@hapic/harbor`**\n\nThis client provides an easy way to interact with various domain endpoints such as repositories, projects, and more.\nThe Harbor Image Registry is an open-source platform that enables users to store, manage, and distribute container images. \nThe client offers a variety of abstractions to simplify interaction with the platform and speed up the development process.\nWhether you are an experienced developer or new to the world of container images,\nthis API client is a powerful tool to get the most out of the platform.\n\n[Documentation](./packages/harbor)\n\n### Loki 📊\n\nThis client provides an easy way to interact with Grafana Loki,\na log aggregation system designed for efficient, scalable, and cost-effective log management.\nWith this API client, developers can easily send, query, and analyze logs using Loki’s HTTP endpoints.\nIt offers a range of abstractions to simplify integration with Loki’s API,\nwhether you’re pushing structured logs or building dashboards and alerting rules.\nWhether you're just starting with observability or already operating complex monitoring stacks,\nthis client helps you get the most out of your logging infrastructure.\n\n### OAuth2 🛡️\n\n**`@hapic/oauth2`**\n\nThis client provides an easy way to authenticate and authorize **users**, **clients**, **robots**, ...\nusing OAuth2 and OpenID Connect standards.\nWith this API client, developers can easily interact with the server's endpoints, \nsuch as authentication flows, token issuance, and user management. \nThe client offers a range of abstractions to simplify interactions with the server \nand speed up the development process. \nWhether you are an experienced developer or new to OAuth2/OpenID,\nthis API client is a powerful tool to help you implement secure **users**, **clients** \u0026 **robots** authentication \nand authorization in your applications.\n\n[Documentation](./packages/oauth2)\n\n### Vault 🔒\n\n**`@hapic/vault`**\n\nThis client provides a convenient way to interact with various endpoints in Vault, \nsuch as secrets, engines, and more. \nVault is a popular open-source tool used for securely storing and accessing sensitive data, \nsuch as passwords, API keys, and certificates. \nThe client offers a range of abstractions to simplify interactions with Vault and\nstreamline the development process. \nWhether you are a seasoned developer or new to the world of secrets management, \nthis API client is a powerful tool to help you get the most out of Vault.\n\n[Documentation](./packages/vault)\n\n### VictoriaLogs 🔒\n\n**`@hapic/vault`**\n\n...\n\n\n[Documentation](./packages/victorialogs)\n\n## License\n\nMade with 💚\n\nPublished under [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftada5hi%2Fhapic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftada5hi%2Fhapic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftada5hi%2Fhapic/lists"}