Skip to content

Add "302 Found" HTTP response - #507

Closed
DominikPalo wants to merge 1 commit into
httpswift:stablefrom
DominikPalo:feature/add-302-found-http-response
Closed

DominikPalo wants to merge 1 commit into
httpswift:stablefrom
DominikPalo:feature/add-302-found-http-response

Conversation

@DominikPalo

@DominikPalo DominikPalo commented Oct 12, 2021 •

Copy link
Copy Markdown

The "302 Found HTTP" response is a common way of performing URL redirection. We use the swifter framework in our projects for creating a local webserver handling OAuth2 flow and the 302 Found HTTP response is a recommended way for redirecting to the OAuth2 success pages.

I created this PR to make things easier, so instead of writing

server[self.callbackPath] = { _ in
	return .raw(302, "Found", ["Location": authSuccessUri], nil)
}

we could just write

server[self.callbackPath] = { _ in
	return .found(authSuccessUri)
}

@DominikPalo DominikPalo closed this Oct 9, 2026
@DominikPalo

Copy link
Copy Markdown
Author

Closing this since the project appears to be no longer maintained. Happy to reopen if that changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant