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

How to use handler / interceptor while (de)serializing the json content? #90

Open
coldfish opened this issue Jul 31, 2019 · 6 comments
Open

Comments

@coldfish
Copy link

I'd like to write an interceptor to manipulate the body content of HTTP calls. Before sending, it's needed to be converted to Encrypted data as byte[] and after receiving, deserialize the object as well. I don't want to make this manipulation for each web requests and finally, I need them to get as pure T Request/Response classes.

Is there any way to handle the http calls in one-place for requests/responses?

@jdnichollsc
Copy link
Member

You can start checking here https://github.com/proyecto26/RestClient/blob/master/src/Proyecto26.RestClient/Helpers/HttpBase.cs#L81

@coldfish
Copy link
Author

coldfish commented Aug 1, 2019

I'm confused a little bit. Do you suggest me to edit source code directly or a technique to override this method I'm not aware of?

@jdnichollsc
Copy link
Member

Any pull request is always welcome mate, this is a community plugin 🙂

@coldfish
Copy link
Author

coldfish commented Aug 1, 2019

Thanks for your support. I'll do if I make it worked..

@coldfish coldfish closed this as completed Aug 1, 2019
@jdnichollsc
Copy link
Member

jdnichollsc commented Aug 2, 2019

You don't need to close this, anyone could do this task in their spare time, that's Open Source :)
Also, if you need this urgently you can ask for support with Tidelift here 👍

@jdnichollsc jdnichollsc reopened this Aug 2, 2019
@jdnichollsc
Copy link
Member

@coldfish do you have any example with C#?

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

2 participants