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

RestClient.GetResponse private to protected #77

Closed
valvv opened this issue Feb 13, 2021 · 4 comments
Closed

RestClient.GetResponse private to protected #77

valvv opened this issue Feb 13, 2021 · 4 comments

Comments

@valvv
Copy link

valvv commented Feb 13, 2021

Hi,
I need to create custom POST responce instead of SendRequest with both PostParameters.InUri and PostParameters.Post parameters. I can use ConstructRequest and WriteParamBody, However, it will be nice to move RestClient.GetResponse to protected to use it after ConstructRequest
Thanks

@JKorf
Copy link
Owner

JKorf commented Feb 22, 2021

I'm not sure if I understand the issue.

@valvv
Copy link
Author

valvv commented Feb 22, 2021

I need both Uri and InBody PostParameters in 1 request.
So I can't use SendRequest function
I can do it this way:
CryptoExchange.Net.Interfaces.IRequest request = base.ConstructRequest(uri, httpMethod, uriParams, signed, PostParameters.InUri, ArrayParametersSerialization.Array, 0);
base.WriteParamBody(request, bodyParamst, Constants.JsonContentHeader);
return await base.GetResponse(request);

However GetResponse is private. Please, do it protected

@JKorf
Copy link
Owner

JKorf commented Mar 1, 2021

I've changed it to virtual protected in the latest version

@JKorf JKorf closed this as completed Mar 1, 2021
@valvv
Copy link
Author

valvv commented Mar 1, 2021

Thanks

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