Release News.

Versioning your API in Go

At some point in time your API need to have versions like /v1 or /v2 (like github API).
To implement this in Go I will use gorilla/mux router and I will assume you have a functional Go environment.

We will make a new project with the following main.go file:

package main

import (
    "flag"
    "net/http"

    "github.com/gorilla/mux"
)

var (
    port = flag.String("port", "8080", "port")
)

func main() {
    flag.Parse()
    var router = mux.NewRouter()
    var api = router.PathPrefix("/api").Subrouter()
    api.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
        w.WriteHeader(http.StatusNotFound)
    })
    http.ListenAndServe(":"+*port, router)
}

On short we have created a new router with a nice soubrouter for handling /api which represent the base of our versioned routes.
The routes will show like /api/v1/endpoint, /api/v2/endpoint …

API Security Best Practices

By nature, APIs are meant to be used. Even if all of your users are internal, security problems can still arise. To help with this, we’ve assembled a list of best practices to keep in mind when securing and locking-down an API or web service.

Use HTTPS

The web has moved past standard HTTP. With browser vendors flagging URLs that don’t use a secure layer, it’s time to do the same for your API. HTTPS uses Transport Layer Security (TLS) to encrypt traffic. This means communication between the client and server is encrypted. For your API, this means the content sent from your API is secured from third-parties, but more importantly it means that the access credentials are secured.

Authenticate …

How to fix Error 429: Too Many Requests

Your application is running smoothly. Tests have passed. Suddenly you start to see 429 error responses from an API. The 429 error means your app has made too many requests and has hit the rate limit of an API. The 429 (Too Many Requests) error is an HTTP status code is a client error sent back from the server to signal that you’ve reached your allowed limit.

While rate limiting may seem like a bad thing when you encounter it, this restriction is a protective feature of most consumable APIs. Rate limits prevent services from intentional abuse, as well as accidental abuse that may occur when developers are testing applications. If you’ve ever poured water into a funnel too quickly, …

How to Detect Bot Traffic?

Often we perceive the term “bot” as negative. However, not all bots are bad. The issue is that good bots can share similar characteristics with malicious bots. Therefore, good bot traffic get labeled as bad and get blocked.

Bad bots are only getting smarter, and it’s hard for other bots to stay block-free. This creates a lot of issues not only for site owners to ensure a healthy performance of their website but for the web scraping community as well.

In this article, we’ll go more in-depth about bot traffic, what it is, how websites detect and block bots, and how it can affect businesses.

What is bot traffic?
Bot traffic is any non-human traffic made to a website. It’s …

What is TCP/IP and how does it work?

TCP/IP is a collection of rules for data transfer between devices. And rules are important when you want to move information online.

Remember sending letters? If you wanted to use the postal service, you had to write down a name and address on an envelope, according to the rules. You had to use an certain amount of stamps and drop the letter into a letter box. Then there were even more regulations governing how the postal workers handled your mail.

There are no stamps on the internet, but there are rules. And your apps and devices have to follow these rules in order to send and receive information. This is called the TCP/IP model.

What is TCP/IP?

TCP/IP is a …

What is a Proxy Server [2021 Guide]

What is a proxy?

A proxy acts as an intermediary between you and the internet. When you’re using a proxy server, your request runs through the proxy server (which changes your IP address) first, and only then connects to the website. This is the main thing to know if you want to define a proxy.

What are proxies used for?
Proxies for personal use

There are several reasons for individuals or organizations to use a proxy.

Firstly, for regular internet users, a proxy could come in handy if there is a need to browse the internet more privately. On top of the privacy factor, proxy servers can also improve security levels if the proxy server is correctly configured as users …