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

Comparing bodyType and MAP_STRING_WILDCARD with '!=' instead of equals #12

Closed
pavelzhur opened this issue Nov 3, 2016 · 0 comments
Closed

Comments

@pavelzhur
Copy link
Contributor

pavelzhur commented Nov 3, 2016

Hi!

I have such api:

@Headers("Accept: application/json")
public interface ApiWebService {
    @RequestLine("POST /campaign/add/")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    GarsTelecomAddCampaignResponse addCampaign(Map<String, ?> request);
}

And builder like that:

HystrixFeign.builder()
                .setterFactory(new MyCommandConfiguration())
                .decoder(new GsonDecoder())
                .encoder(new FormEncoder())
                .target(ApiWebService.class, url);

When i'm trying to send request, i recieve such exception: Caused by: feign.codec.EncodeException: class java.util.HashMap is not a type supported by this encoder.

I think it's because of this comparison: if (bodyType != MAP_STRING_WILDCARD) in FormEncoder.encode method. Replacement this comparison by equals working fine.

zhurpavel pushed a commit to zhurpavel/feign-form that referenced this issue Nov 3, 2016
xxlabaza added a commit that referenced this issue Nov 8, 2016
@xxlabaza xxlabaza closed this as completed Nov 8, 2016
velo pushed a commit to OpenFeign/feign that referenced this issue Oct 7, 2024
velo pushed a commit to OpenFeign/feign that referenced this issue Oct 7, 2024
velo pushed a commit to OpenFeign/feign that referenced this issue Oct 8, 2024
velo pushed a commit to OpenFeign/feign that referenced this issue Oct 8, 2024
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

No branches or pull requests

2 participants