Skip to content

Provide a means for implementors to be able to access the final API request made #39

Description

@apotek

Description

Code that uses this library can pass parameters to the request and get back response data. However, for diagnostics, a user of this library might need to be able to track the actual request that was made, for debugging, testing, etc.

If the Endpoint class could provide a method to return the actual request made (either as a Request object) or as a simple string consisting of METHOD PATH PARAMS, that would help in being able to track the actual behavior of the API.

Issue Owner

@apotek

Proposed Solution

The Endpoint parent class (and interface) should have a getRequest() method that always contains that most recent request made by the class.

This means that the Endpoint, when making the request, would need to store the Request (or request string) to a class variable (or similar) just before or after making the request.

Alternatives Considered

Additional Context

### Tasks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions