What the docs provide:
What we do in the InStore App (see the AcceptHeader + the appId at the end of the query string):
public async Task<byte[]> GetPNGReceiptAsync(IssueResponse issueResponse)
{
var httpRequest = new HttpRequestMessage(HttpMethod.Get, $"/v2/issue/{issueResponse.ftQueueID}/{issueResponse.ftQueueItemID}?appId={Guid.NewGuid()}");
httpRequest.Headers.Add("Accept", "application/png");
var result = await SendWithAuthenticatedClient(httpRequest);
if (!result.IsSuccessStatusCode)
{
throw new Exception("Failed to receive PNG call." + await result.Content.ReadAsStringAsync());
}
return await result.Content.ReadAsByteArrayAsync();
}
TODO:
- extend the docs to inform about the different supported
Accept headers to define the wanted returned format
- either document the appId query parameter OR remove it from the InStore App in case it makes no sense (as it anyway does create a new GUID with every call)