Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

How to do a redirect using the reactive framework? #7

@asarkar

Description

@asarkar

I'm playing with Instagram REST API and since they use OAuth, I need to redirect to their authorization URL. In regular Spring, that can be done by returning "redirect:" + authorizationUrl. Doing the following throws exception. See SPR-15078.

@GetMapping("/")
Mono<ServerResponse> redirect() {
        return ServerResponse.status(TEMPORARY_REDIRECT)
                .location(URI.create(authorizationUrl))
                .build();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions