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

Add Content-Type application/json-rpc into Auto Unmarshaling support #203

Closed
VadimKulagin opened this issue Dec 19, 2018 · 3 comments
Closed
Assignees

Comments

@VadimKulagin
Copy link

I need to work with an API that provides JSON-RPC, which returns "Content-Type: application/json-rpc".

But this API client cannot automatically unmarshal a response with such a Content-Type.
This problem is similar to #134, #171, #92.

I think there are two solutions:

  • rework the regular expression jsonCheck again;
  • or make some parameter (ForceJSONUnmarshaling bool or ForcedResponceContentType string) that will force the Unmarshaling response into the correct format, regardless of the response Content-Type.
@jeevatkm
Copy link
Member

@VadimKulagin Thank you for reporting an issue. Its better to add support via regex update.

@jeevatkm jeevatkm changed the title Unmarshaling does not work with Content-Type application/json-rpc Add Content-Type application/json-rpc into Auto Unmarshaling support Dec 19, 2018
@jeevatkm jeevatkm self-assigned this Dec 22, 2018
@jeevatkm jeevatkm added this to the v1.11.0 Milestone milestone Dec 22, 2018
@jeevatkm
Copy link
Member

@VadimKulagin I have added support content-type application/json-rpc. You could point to master commit sha in your go.mod file and proceed.

I'm planning to release this enhancement in v1.11.0.

@jeevatkm
Copy link
Member

Done 😄

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

No branches or pull requests

2 participants