serde_qs icon indicating copy to clipboard operation
serde_qs copied to clipboard

Incompatibility of QsQuery with actix_web Query caused by private tuple field

Open Adhalianna opened this issue 1 year ago • 2 comments

I have just attempted to replace actix's Query with QsQuery but I had some problems. Query has its field public which makes constructing it, for example within tests, possible whereas QsQuery cannot be constructed without taking in the whole request with from_request.

Adhalianna avatar Jul 07 '23 11:07 Adhalianna

I have quickly checked and it seems that Query has had its field public at least since actix_web version 2.0.0, version 1.0.0 has it private.

Adhalianna avatar Jul 07 '23 11:07 Adhalianna

Hey @Adhalianna

Could you share a little more about the use case? Where would you want to access the QsQuery rather than the inner type, if not from the request object?

If possible, I would prefer to keep the inner type private, in case we want to extend it to include more fields in the future. But happy to make the change if there's no good alternative.

samscott89 avatar Jul 14 '23 16:07 samscott89