With the Accept-Language header passed through snapd I’d expected the following store request:
$ http -v --json https://api.snapcraft.io/api/v1/snaps/details/store-test-ubuntu-desktop Accept-Language:de X-Ubuntu-Series:16 fields==description
to give the output (i.e. the description in German):
GET /api/v1/snaps/details/store-test-ubuntu-desktop?fields=description HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Accept-Language: de
Connection: keep-alive
Content-Type: application/json
Host: api.snapcraft.io
User-Agent: HTTPie/0.9.8
X-Ubuntu-Series: 16
HTTP/1.1 200 OK
Content-Length: 201
Content-Type: application/json
Date: Tue, 05 Sep 2017 03:14:22 GMT
Server: gunicorn/19.7.1
X-Request-Id: cf7cf278-d937-44aa-a7db-8e4cc2046a5b
X-VCS-Revision: 976e5cd
{
"description": "Es is Wunderbar!",
"package_name": "store-test-ubuntu-desktop"
}