コード例 #1
0
        public string Post(string path, string jsonPayload, string sessionId)
        {
            support.LogRequest("POST", path, jsonPayload);

            headerGen = new SessionIdAuthHeaderGenerator(sessionId);

            byte[] payloadBytes = null;
            if (jsonPayload != null)
            {
                payloadBytes = Converter.ToBytes(jsonPayload);
            }
            else
            {
                payloadBytes = new byte[0];
            }

            if (proxyConfiguration != null)
            {
                HttpMethods.proxyConfiguration = proxyConfiguration;
            }

            byte[] responseBytes = HttpMethods.PostHttp(headerGen, path, payloadBytes, additionalHeaders);

            String response = Converter.ToString(responseBytes);

            support.LogResponse(response);

            return(response);
        }
コード例 #2
0
ファイル: RestClient.cs プロジェクト: vtcharlie/esl.sdk.net
        public string PostMultipartPackage(string path, byte[] content, string boundary, string json) {
            support.LogRequest("POST", path, json);

            headerGen = new ApiTokenAuthHeaderGenerator(apiToken);

            byte[] responseBytes = HttpMethods.MultipartPostHttp(apiToken, path, content, boundary, headerGen);
            string response = Converter.ToString(responseBytes);
            support.LogResponse(response);

            return response;
        }
コード例 #3
0
ファイル: RestClient.cs プロジェクト: vtcharlie/esl.sdk.net
        public string PostMultipartFile(string path, byte[] fileBytes, string boundary, string sessionId, string json) {
            support.LogRequest("POST", path, json);

            headerGen = new SessionIdAuthHeaderGenerator(sessionId);

			byte[] responseBytes = HttpMethods.MultipartPostHttp(apiToken, path, fileBytes, boundary, headerGen);
            string response = Converter.ToString(responseBytes);
            support.LogResponse(response);

            return response;
		}
コード例 #4
0
        public string PostMultipartPackage(string path, byte[] content, string boundary, string json)
        {
            support.LogRequest("POST", path, json);

            headerGen = new ApiTokenAuthHeaderGenerator(apiToken);

            byte[] responseBytes = HttpMethods.MultipartPostHttp(apiToken, path, content, boundary, headerGen);
            string response      = Converter.ToString(responseBytes);

            support.LogResponse(response);

            return(response);
        }
コード例 #5
0
        public string PostMultipartFile(string path, byte[] fileBytes, string boundary, string sessionId, string json)
        {
            support.LogRequest("POST", path, json);

            headerGen = new SessionIdAuthHeaderGenerator(sessionId);

            byte[] responseBytes = HttpMethods.MultipartPostHttp(apiToken, path, fileBytes, boundary, headerGen);
            string response      = Converter.ToString(responseBytes);

            support.LogResponse(response);

            return(response);
        }
コード例 #6
0
        public string PostMultipartPackage(string path, byte[] content, string boundary, string json)
        {
            support.LogRequest("POST", path, json);

            headerGen = new ApiTokenAuthHeaderGenerator(apiToken);

            if (proxyConfiguration != null)
            {
                HttpMethods.proxyConfiguration = proxyConfiguration;
            }

            string response = HttpMethods.MultipartPostHttp(apiToken, path, content, boundary, headerGen, additionalHeaders);

            support.LogResponse(response);

            return(response);
        }
コード例 #7
0
        public string PostMultipartFile(string path, byte[] fileBytes, string boundary, string sessionId, string json)
        {
            support.LogRequest("POST", path, json);

            headerGen = new SessionIdAuthHeaderGenerator(sessionId);

            if (proxyConfiguration != null)
            {
                HttpMethods.proxyConfiguration = proxyConfiguration;
            }

            string response = HttpMethods.MultipartPostHttp(apiToken, path, fileBytes, boundary, headerGen, additionalHeaders);

            support.LogResponse(response);

            return(response);
        }
コード例 #8
0
ファイル: RestClient.cs プロジェクト: CodeRedick/esl.sdk.net
        public string PostMultipartFile(string path, byte[] fileBytes, string boundary, string json)
        {
            support.LogRequest("POST", path, json);

            headerGen = new ApiTokenAuthHeaderGenerator(apiToken);

            if (proxyConfiguration != null)
            {
                HttpMethods.proxyConfiguration = proxyConfiguration;
            }

            byte[] responseBytes = HttpMethods.MultipartPostHttp(apiToken, path, fileBytes, boundary, headerGen);
            string response      = Converter.ToString(responseBytes);

            support.LogResponse(response);

            return(response);
        }