Tag: Web-API
17 posts
-
Building a REST API with Axum: Tower Services, Extractors, State and Error Handling
Build Rust HTTP services with Axum: Tokio and Tower, routing, extractors, middleware, shared state, errors, WebSocket, and production-ready REST patterns.
-
tRPC: End-to-End Type Safety Without Codegen, and Where the Types Stop Protecting You
How tRPC shares types between a TypeScript server and client through inference, how to set up routers, context, and auth middleware in Next.js, and the gaps: Dates arriving as strings, runtime validation, batching, versioning, and non-TypeScript clients.
-
Mocking APIs with MSW: Handlers for the Browser and Node Tests, Runtime Overrides and GraphQL
Mocking APIs at the network level with Mock Service Worker: defining handlers, browser and Node.js setup, using MSW in tests, runtime handler overrides, GraphQL, and an e-commerce example.
-
Hono on the Edge: Routing, Middleware, JWT and Cloudflare Workers Setup
One Hono API for Cloudflare Workers, Deno, Bun and Node.js: routing, middleware and context, JWT auth, request validation, streaming and error handling.
-
Validating Data with Joi: Schemas, Conditional and Async Rules, abortEarly and stripUnknown
Complete Joi guide for data validation in Node.js: schema design, async validation, abortEarly/stripUnknown security tradeoffs.
-
Elysia on Bun: Type-Safe Routes, Validation, Plugins and End-to-End Types with Eden
Build APIs with Elysia on Bun: routing, TypeBox validation that types your handlers, hooks, plugins, JWT, WebSocket, and Eden Treaty for client-side types.
-
Building APIs with NestJS: Modules, DI, DTO Validation, Guards, Interceptors and TypeORM
Build production-grade APIs with NestJS. Covers modules, controllers, services, guards with proper DI, TypeORM (and why synchronize:true is dangerous in production), interceptors, exception filters, and testing.
-
Go Web APIs with net/http: Routing, Middleware, Context, JSON and Database Access
Build production-ready web APIs with Go. Covers net/http, routing, middleware, database access, JSON handling, and deployment best practices.
-
Building a GraphQL API with Apollo: Schema, Resolvers, Mutations, Subscriptions and React Client
Build efficient APIs with GraphQL: schema design, resolvers, queries, mutations, subscriptions, and Apollo Server/Client—with practical TypeScript.
-
gRPC Services with Protocol Buffers: Unary and Streaming RPC in Node.js and Go
Build high-performance APIs with gRPC: Protocol Buffers, service definitions, Unary/Streaming RPC, Node.js and Go examples, errors, auth, and deployment.
-
Building on the Claude Messages API: max_tokens, Streaming, Tool Use Loops, Caching and Retries
Claude Messages API in production: required max_tokens, content blocks, streaming, the tool use loop, prompt caching, 429/529 retries and stop_reason values.
-
OpenAI API in Code: Chat Completions, Responses, Tool Calls, Structured Outputs and Retries
The OpenAI API with the current Python and Node SDKs: Chat Completions vs Responses, tools and tool_choice, Structured Outputs, streaming, and 429 retries.
-
Axios in Practice: Instances, Interceptors, Error Handling and Cancellation
Using Axios for HTTP requests in JavaScript and Node.js: instances, request configuration, response shape, error handling, interceptors, cancellation, and concurrent requests.
-
Boost.Beast REST Server Mechanics: Parser Limits, Keep-Alive, Timeouts and CORS [#31-2]
A REST server built directly on Boost.Beast: request_parser body and header limits, keep-alive with need_eof, tcp_stream timeouts, routing, JSON and CORS.
-
REST vs GraphQL vs gRPC: Picking an API Style by Client, Payload and Latency
How REST, GraphQL and gRPC differ in schema, transport and tooling, with example code, a comparison table and when a hybrid of the three makes sense.
-
The Facade Pattern in C++: One Simple Interface over a Messy Subsystem, and What It Hides
C++ Facade pattern: wrap a complex subsystem behind one simple interface, with multimedia, build-pipeline, and database examples, plus the tradeoffs of hiding subsystems behind one API.
-
API Rate Limiting: Fixed Window, Sliding Log and Token Bucket, and Making Them Atomic in Redis
How fixed window, sliding log, and token bucket rate limiters actually behave, how to make them atomic in Redis, and the proxy, clock, and retry pitfalls that break them in production.