spinframework / spinframework/spin

Handle redirects in outbound HTTP Requests

Open
#2,544 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement http
Dominant language
Rust
Stars
6.5k
Forks
310
Avg merge
1d 20h
Merged PRs (30d)
24

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the spin_sdk::http::Request API and review the proposed spin-contrib-http approach for Rust redirects. Read issue #1881 to resolve how redirects should interact with allowed_http_hosts, and determine whether the feature belongs in other language SDKs. Done means the redirect behavior and host-policy interaction are defined and implemented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.