{
  "id": 8559113,
  "title": "I built a transport-independent foundation for JSON API clients in Perl",
  "url": "https://urgent.news/2026/09/19/i-built-a-transport-independent-foundation-for-json-api-clients-in",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-19T23:37:59.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/pannakoota/i-built-a-transport-independent-foundation-for-json-api-clients-in-perl-1od6"
  },
  "original_language": "en",
  "account": "The article discusses the creation of HTTP::API::Core, a small Perl module designed to act as a transport-independent foundation for JSON API clients. The author found that the majority of the code required to build an API client is not specific to the API being wrapped, but rather consists of infrastructure code common to most API clients. This led to the development of HTTP::API::Core, which separates HTTP transport from API-client policy.\n\nThe core idea behind HTTP::API::Core is to keep the HTTP transport separate from the application-level policies surrounding it. This is achieved by using a different HTTP library as the transport layer, such as HTTP::Tiny, LWP, Mojo::UserAgent, or Furl, while HTTP::API::Core handles the policy aspects. The HTTP implementation is responsible for making the request, while HTTP::API::Core manages retry, pagination, error handling, authentication, request IDs, logging, metrics, and idempotency.\n\nThe module is designed to be dependency-light and does not replace the existing Perl HTTP ecosystem. It sits above the transport layer, allowing developers to choose their preferred HTTP library. The API client uses HTTP::API::Core to handle repetitive infrastructure code, while the application-level policies remain separate.\n\nAn example of using HTTP::API::Core is shown in the article, where a simple API client is created with base URL, headers, timeout, and retry settings. The client can then use the API in a simple and concise manner, with the core handling the repetitive infrastructure. The author also discusses how retry, pagination, and rate limits are handled in a consistent and customizable manner, providing flexibility for different API styles and requirements.",
  "summary": "Writing a simple API client is easy. my $response = $http -> get ( $url ); Then the client starts being used in production. Suddenly, it needs to handle: query parameters JSON encoding and decoding structured errors retries and Retry-After rate limits pagination authentication request IDs logging and metrics idempotency At that point, what started as a small API wrapper often becomes a collection…",
  "key_points": [
    "HTTP::API::Core module created for transport-independent JSON API clients in Perl",
    "Separates HTTP transport from API-client policy for flexibility",
    "Allows developers to choose preferred HTTP library while handling common infrastructure"
  ],
  "editors_take": "This development allows Perl developers to focus on API-specific logic by separating infrastructure code from transport layers, making it easier to build and customize JSON API clients.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}