Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I not use 'final' when sending a POST request with Feign in Spring Boot? #875

Closed
K-jun98 opened this issue Jul 8, 2023 · 2 comments
Closed

Comments

@K-jun98
Copy link

K-jun98 commented Jul 8, 2023

ext {
    set('springCloudVersion', "2022.0.3")
}

    id 'org.springframework.boot' version '3.1.1'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'

In the request below, if 'final' is attached to the field variable of the RequestParam object, the request is not properly delivered. What is the reason for this?

@FeignClient(name = "client", url = "https://kauth.kakao.com")
public interface RequestAccessToken {

    @PostMapping(
            "/oauth/token?grant_type=authorization_code&client_id={CLIENT_ID}&code={CODE}")
    UserInfoResponse kakaoAuth(
            @PathVariable("CLIENT_ID") String clientId,
            @PathVariable("CODE") String code);


    @PostMapping(path = "/oauth/token", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    UserInfoResponse unlinkUser(@RequestBody RequestParam RequestParam);
}


@Getter
@Setter
@AllArgsConstructor
public class RequestParam {
    String grant_type;
    String client_id;
    String redirect_uri;
    String code;
}
@kbaluc
Copy link

kbaluc commented Jul 16, 2023

look here - OpenFeign/feign-form#77.

@OlgaMaciaszek
Copy link
Collaborator

Closing in favour of OpenFeign/feign-form#77. This is an upstream issue.

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

No branches or pull requests

4 participants