コード例 #1
0
        public string Meta(string filePath)
        {
            string urlParameters = "/meta";
            Dictionary <string, string> headers = new Dictionary <string, string>();

            headers.Add("Accept", "application/json");
            string     fileName     = Path.GetFileName(filePath);
            PutRequest putRequest   = new PutRequest(baseUrl, urlParameters, filePath, headers);
            string     responseBody = putRequest.GetResponseBody();

            return(responseBody);
        }
コード例 #2
0
        public string TikaPlain(string filePath)
        {
            string urlParameters = "/tika";
            Dictionary <string, string> headers = new Dictionary <string, string>();

            headers.Add("Accept", "text/plain");
            string     fileName     = Path.GetFileName(filePath);
            PutRequest putRequest   = new PutRequest(baseUrl, urlParameters, filePath, headers);
            string     responseBody = putRequest.GetResponseBody();

            return(responseBody);
        }
コード例 #3
0
        public string DetectStream(string filePath)
        {
            string urlParameters = "/detect/stream";
            Dictionary <string, string> headers = new Dictionary <string, string>();
            string fileName = Path.GetFileName(filePath);

            headers.Add("Content-Disposition", $"attachment; filename={fileName}");
            PutRequest putRequest   = new PutRequest(baseUrl, urlParameters, filePath, headers);
            string     responseBody = putRequest.GetResponseBody();

            return(responseBody);
        }