ATProtoKit icon indicating copy to clipboard operation
ATProtoKit copied to clipboard

[Feature Request]: Make APIClientService a protocol and allow users to provide request handler

Open wmalloc opened this issue 11 months ago • 1 comments

Summary

Allow users to be able to provide their own request handlers

Pain points

Would like to add request and resposne interceptors ro api calls.

Considered Alternatives

No response

Is this a breaking change?

Yes

Library Examples

https://github.com/apple/swift-http-types

Additional Context

No response

wmalloc avatar Jan 23 '25 04:01 wmalloc

Yeah, I'm okay with this. And I might also use that library for it. Once I add the OpenAPI generator, I'll add this to the list of things to do.

MasterJ93 avatar Jan 23 '25 06:01 MasterJ93

I've updated ATProtoKit to version 0.28.0. In it, work has been done that appears to match the request you wanted. More specifically, there is a struct named APIClientConfiguration that should provide you with enough tools to achieve your goal.

At this point, I will consider this issue closed, but if this isn't what you expected, please let me know.

MasterJ93 avatar Jun 02 '25 16:06 MasterJ93