httpx: A Small, Fluent HTTP Client for Go That Stays Close to `net/http`

Go’s standard net/http package is excellent. It’s mature, reliable, performant, and provides almost everything you need to build HTTP clients. But there is one thing I’ve always found myself writing repeatedly: boilerplate. Creating requests, attaching headers, configuring authentication, handling response status codes, decoding JSON, closing response bodies, managing timeouts, and implementing retries — these are common tasks in almost every backend application. I wanted something that would make these operations simpler without introducing another heavy abstraction or a collection of third-party dependencies. ...

November 28, 2026 · 9 min · Saddam H

An easy way to validate Go request

When building REST APIs or web applications in Go, one of the essential tasks is validating incoming request data. Having worked on various small to medium-sized projects in Golang—most of which are microservices providing RESTful APIs—I’ve employed several approaches to handle data validation. Among these, there’s one method I frequently rely on. For validating application/json or text/plain requests, I begin by defining a struct type to represent the specific request payload. Then, I implement a Validate method on that struct to encapsulate the validation logic. ...

October 18, 2017 · 2 min · Saddam H