Skip to content

HTTPClient callback has no way of accessing non-global data #35

@Zephilinox

Description

@Zephilinox

typically with callbacks a void* is passed when setting the callback, and then when something calls the callback, they will pass it that void*. this allows users to cast the void* in to whatever data they need within the callback.

without this, only static/global data is accessible from within the callback, which is quite limiting.
alternatively, something like std::function or a templated function could be used instead, to allow us to pass a lambda for the callback and capture state.

Metadata

Metadata

Assignees

No one assigned

    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