private void fill_params(ref RestRequest req, RequestBodyParams args) { if (args == null) { return; } foreach (var arg in args) { req.AddParameter(arg.Key, arg.Value); } }
public response.BaseResponse <T> patch <T>(string endpoint, RequestBodyParams args = null, bool isbodyjson = true) { var req = new RestRequest(endpoint, Method.PATCH); fill_body_params(ref req, args, isbodyjson); IRestResponse resp = client.Execute(req); check_response(resp); return(deserializeResponse <T>(resp.Content)); }
private void fill_body_params(ref RestRequest req, RequestBodyParams bodyp, bool isJson = true) { if (bodyp == null) { return; } if (!isJson) { fill_params(ref req, args: bodyp); return; } req.AddJsonBody(bodyp); }