Skip to content

Add .movedTemporarily case (HTTP 307) to HttpResponse#352

Merged
adamkaplan merged 1 commit intohttpswift:stablefrom
csch:stable
Dec 6, 2018
Merged

Add .movedTemporarily case (HTTP 307) to HttpResponse#352
adamkaplan merged 1 commit intohttpswift:stablefrom
csch:stable

Conversation

@csch
Copy link
Copy Markdown
Contributor

@csch csch commented Nov 23, 2018

Hi, I'm currently working on prototype based on Swifter and I needed a temporary redirect which I've now commited to my fork.

Do you think this could be useful to integrate in the main repo?

I've used HTTP 307 as I don't need to change the HTTP method on the redirect but if you think that it is a common scenario I'd be happy to change it to 302 and resubmit the PR.

@Vkt0r Vkt0r self-requested a review November 26, 2018 04:57
Copy link
Copy Markdown
Collaborator

@adamkaplan adamkaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. If you want to add 302, that would also be pretty cool. I don't think you should need to resubmit this PR though, because 307 is totally valid.

@adamkaplan adamkaplan merged commit febcee7 into httpswift:stable Dec 6, 2018
@Vkt0r
Copy link
Copy Markdown
Member

Vkt0r commented Dec 7, 2018

@adamkaplan I was thinking about a strategy to support more default status code and HTTP headers as we have a lot of request of this kind of behavior so far. We have the custom one but maybe if we're supporting only a subset we should be creating it little by little more of them. What do you think?

@adamkaplan
Copy link
Copy Markdown
Collaborator

That sounds reasonable to me. There are quite a few codes, pretty large amount of work. Could use a formal strategy

tomieq pushed a commit to tomieq/swifterfork that referenced this pull request Apr 1, 2021
Add .movedTemporarily case (HTTP 307) to HttpResponse
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.

3 participants