In the normal scenario when things are working, we would get a gzip file from the DssStreamResponse with something like the following code:
RawExtractionResult extractionResult = extractionsContext.ExtractRaw(extractionRequest);
// we set awsDownload to true
if (awsDownload) { extractionsContext.DefaultRequestHeaders.Add("x-direct-download", "true"); }
DssStreamResponse streamResponse = extractionsContext.GetReadStream(extractionResult);
using (FileStream fileStream = File.Create(gzipDataOutputFile))
{
streamResponse.Stream.CopyTo(fileStream);
}
However, in the odd occasions, the file we get from the stream response is actually an html file. (And when I opened the html file in a web browser, it would redirect me to downloading the actual gzip file.)
Is this a bug in the api? Or is there something that I might not be doing properly here?