Skip to content

[DevKit] docs - issue receipt - the documentation does not talk about the options for the "Accept" header AND the InStore app does use an appId as query parameter that is not documented #2

@turtletramp

Description

@turtletramp

What the docs provide:

Image

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions