Exemplo n.º 1
0
        public static RestRequest BuildUserBinaryPostRequest(this ServiceClientBase target, string action, object data, byte[] binary, string tokenId, string encryptionToken)
        {
            var request = new RestRequest(target.CalculateUrlForMethod(action), Method.POST, DataFormat.Json);

            target.ApplyHeaders(request);

            request.AddJsonBody(target.CreateUserBinaryRequest(data, binary, tokenId, encryptionToken));

            return(request);
        }
Exemplo n.º 2
0
        public static RestRequest BuildEmptyUserPostRequest(this ServiceClientBase target, string action, string tokenId, string encryptionToken)
        {
            var request = new RestRequest(target.CalculateUrlForMethod(action), Method.POST, DataFormat.Json);

            target.ApplyHeaders(request);

            request.AddJsonBody(target.CreateEmptyUserRequest(tokenId, encryptionToken));

            return(request);
        }
Exemplo n.º 3
0
        public static RestRequest BuildSecurePostRequest(this ServiceClientBase target, string action, object data, string tokenId, string encryptionToken)
        {
            var request = new RestRequest(target.CalculateUrlForMethod(action), Method.POST, DataFormat.Json);

            target.ApplyHeaders(request);

            var fReq = new SecureRequest()
            {
                ClientVersionNo = target.WebClient.ClientVersionNo,
                Id      = tokenId,
                Payload = new SecurePayload(data, encryptionToken),
            };

            request.AddJsonBody(fReq);

            return(request);
        }