Beispiel #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);
        }
Beispiel #2
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;
        }
Beispiel #3
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;
		}
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #8
0
        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);
        }