/// <summary> /// R operation fro Document /// </summary> /// <typeparam name="T"></typeparam> /// <param name="request"></param> /// <returns></returns> public GetResponse <T> GetDocument <T>(GetDocRequest request) { string getUrl = RESTfulESUrlBuilder.Init().Document(request.DocumentId).Type(request.Type).Index(request.Index).Host(clusterName) .Url(); return(restServiceClient.Get <GetResponse <T> >(getUrl)); }
public byte[] getDoc(string name) { GetDocRequest req = new GetDocRequest(); req.user = new User(); req.user.login = conf.Login; req.user.pass = Utils.GetMD5String(conf.Soap_pass); req.fileName = name; GetDocResponse resp = (GetDocResponse)Soap.GetDoc <GetDocResponse>(req); if (resp.errorCode != 0) { throw new Exception(resp.errorMessage); } return(Utils.Base64DecodeToBytes(resp.content, "UTF-8")); }
public Response GetDoc([FromBody] GetDocRequest request) { return(_service.getDoc(request.DocId)); }