Skip to content

Handle redirects in outbound HTTP Requests #2544

@tpmccallum

Description

@tpmccallum

Currently, outbound HTTP Requests, i.e. made by spin_sdk::http::Request, only return one hop (regardless of the response code).
Currently a user will have to handle redirect response codes and follow links in the response header (and also set their own max_hops etc.).

It would be great if we could implement redirects. Perhaps this could be part of the spin-ccontrib-http by @ThorstenHans - my understanding is that this will implement the follow redirect feature in Rust only.

Not sure if this is also a new feature request in languages other than Rust.

Also, @itowlson raised a great question: How should redirects interact with allowed_http_hosts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions