How to build backend microservices using WeatherAPI as a proxy

General terms

Described in the Operational Level Agreement.

Any links to the API generated on the backend must not use hardcoded values, since the destination varies according to each environment (public, internal, staging, testing etc). Instead you must read the following HTTP headers which are included in all requests from the API:

  • X-Forwarded-Host
  • X-Forwarded-Proto

Here is a typical example of the headers sent by a request from the build server:


    "Accept-Encoding": "gzip",
    "Content-Length": "0",
    "Host": "",
    "User-Agent": "WeatherAPI/",
    "X-Forwarded-Host": "",
    "X-Forwarded-Proto": "https"




The returned request body cannot be empty; this is flagged as an error in the API.

Response headers

  • Content-Type: This must be an IANA-registered media type. If you invent your own the API conversion routines will fail


For more information, including technical details, please contact:

  • Geir Aalberg (
  • Håvard Futsæter (
2020-01-09, Geir Aalberg