actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

Updating to HTTP crate v1

Open Thomasdezeeuw opened this issue 1 year ago • 4 comments

Apologies if this is not the right way to go about this for this crate.

I'm wondering if it's possible to update actix-http (3.7.0) and actix-router (0.5.3) to use v1 of the http crate as both are still on v0.2.

I don't know if that is considered a breaking change or not though.

Thomasdezeeuw avatar May 31 '24 13:05 Thomasdezeeuw

also see discussion in #3208

robjtede avatar May 31 '24 13:05 robjtede

I'm open to the idea of providing the necessary compatibility functions to convert to and from http v1 types behind a crate feature. I think that is the most helpful thing we can do at this stage.

We only use the actual primitives from that crate:

  • StatusCode
  • Method
  • Uri
  • HeaderName
  • HeaderValue

As such, the conversion methods will be extremely trivial (as shown already by @asonix: https://github.com/actix/actix-web/pull/3208#issuecomment-2139818375) but good to have nonetheless.

None of the composite types like header maps or request/response structures are used.

robjtede avatar May 31 '24 21:05 robjtede

For our use case we like to remove http v0.2 entirely, but I understand that will require a breaking change (i.e. won't happen until v5).

Thomasdezeeuw avatar Jun 04 '24 06:06 Thomasdezeeuw