Inspect HTTP Request and Response in Golang

Golang is getting popular for writing a web applications. One of the core concepts of this web application is handling requests and responses. In Golang, net/http package from the standard library provides all HTTP requests and responses mechanisms.  As a developer, you often print this HTTP request or the response for debug purposes. net/http/httputil package … 

 

Build SQL update query for HTTP Patch request in Golang

It seems pretty straightforward to implement HTTP Patch request. The handler receives the request, unmarshals the body, validates the payload, sanitizes it and then sends it to persist layer for persisting into the Database. Let’s look into an example. For example, we are updating a user resource. type UserResource struct { FirstName string `json:”first_name,omitempty” db:”first_name”` … 

 

Upgrade to PHP 7.4 from PHP 7.2

This is the upgrade of my previous post . Previously, I showed how to upgrade to 7.2. Now, it’s time for one more jump to new version. The latest version of PHP comes with a couple of changes Arrow functions (Adds short closures) Preloading to improve performance Typed properties in classes Improved type variance The … 

 

Logging with Winston in your Node.js application

Logging is an essential part of application.  According to Twelve-Factor App methodology it’s the XI factor of application development. A proper logging gives you a valuable insite of your application. In Node.js application, it is always suggested to use logging libraryrather than just using console.log  in productione environment. Log4js, Bunyan , and Winston are the …