Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Negotiating API versions via HTTP Accept headers

The version as part of the route approach works fine if we assume that the API server is always supporting the latest API version. In this scenario, the client can simply select the highest version that it can work with without any concern about the server hosting the API. What if this assumption does not hold?

Let's say that we are developing a chat server that users can download and deploy on their own infrastructure. Besides the chat server package, we also develop and maintain the official client for connecting to the chat server. The chat server exposes an API endpoint with a /messages/:channel path, which clients can invoke to obtain a list of messages for a particular channel.

In version ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content