I am not entirely sure how to do this or really where to begin, I can't seem to find any information pointing me in the correct direction. I am calling an API and returning some data that is compressed?/Encoded. If I call the API and try to look at the data I see this.
My code to call the API
public static async Task<string> regGet(String RequestURL)
{
var client = new RestClient(RequestURL);
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "multipart/mixed; boundary=Boundary_105363_1671506527_1650566832881");
request.AddHeader("accept", "*/*");
request.AddHeader("Authorization", "Bearer " + TokenManager.GetAccessTokenString("TRN"));
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content.ToString());
return response.Content;
}
and what I see
> --Boundary_106430_1882288751_1650571711623
Content-Encoding: deflate
Content-ID: 1-00023d41-0618-3602-8e77-b89b271c7144
dl_id: 1-00023d41-0618-3602-8e77-b89b271c7144
dl_compression_type: deflated
dl_document_name: MITBAL
dl_document_date: 2021-07-30T03:15:12.628Z
dl_document_indexed_date: 2021-07-30T03:15:14.647Z
dl_message_id: 9d3db66d-696d-4e3f-bea8-ae4c6ae620d4
dl_corrupt: false
dl_size: 942
dl_encoding: UTF-8
> x?]UM??6►??g?kP▼?-?hJ???"-R??K?&n?@vS$N???⌂?♀????`<♫??U7?⌂3az?m?=e?☻????=e?=`-?_i?☺??G?m??bY?O?q?§[????♦???????=@t?↑►#'`'??♥??♀?=↔◄???a?hY6??♫?6?<úXT?
^?????E♥?~Z?>?Y?☻s§???EK????it?nz?K?Z???\VE???§rp?!???y?l ?va?Z?↑??a??§?P♠?►???↔??1?~H?N◄r??????7z?????v?t]D*?&??V ??↓?►`?∟??^?M?s♫??`???♣?L{
@?q????♦>3??e?-@
?/???)▲@d♀B?↑♣?_?i↨ ↔U? =C;J?%V?|@?∟▲?Z??g??♦?♣??N??0)??<?h?xN7v?H?L??>?S???A?;??▲@?]↔^ f?♦Fz??+?☺↕
??~►?,?▼??↕???♦????@>A[/??0D\9?5&J?y?pV ?↨t☼?Y?cO~????D?l#p?SK?↕4☺?;F?▲|?S$-?^i2X?????A?O???Y?k¶J^/W♀k??N~?i??n▼↓u???O2=???z?_?♦?K6;?g???0A?Nt??Js?↓¶?▲l?9??4▲TRT???_?Tk,?|}?????[?????/??▼??⌂v?????#?[??o__o??/??????_?M?Q?n?#M
z???=no⌂??(?g?z.?g%♀??Y?^^ ??????)??q?????/?♥???^
--Boundary_106430_1882288751_1650571711623--
Any ideas where to start?
I have tried to decode it, using the following code but i just get more encoded characters
Encoding encoding = Encoding.GetEncoding("ISO-8859-1");
var result = encoding.GetString(response.RawBytes);