You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do a Invoke-WebRequest to a URI such as "https://SomeStoreName.azconfig.io/kv?label=SomeLabel&api-version=1.0" the response "Content" contains an array of strings TypeName: System.Byte, Is this by design or a bug? If I look at the "RawContent" I see the header and the regular response I was expecting, but I really don't want to have to parse this text for my data.
Invoke-WebRequest -Uri $uri -Method GET -Headers $AppConfigHeaders -ContentType "application/json"
The text was updated successfully, but these errors were encountered:
justinmetz
changed the title
Invoke-WebRequest returns content as array of strings System.Byte
Invoke-WebRequest returns content as array of Integers [System.Byte]
Sep 24, 2020
@justinmetz It's by design. The type of Content is byte array, which is not controlled by server. As for how to decoding the byte array to string, you should check the response header Content-Type. As we can see it's utf-8, so we use UTF8 here.
Hi,
When I do a Invoke-WebRequest to a URI such as "https://SomeStoreName.azconfig.io/kv?label=SomeLabel&api-version=1.0" the response "Content" contains an array of strings TypeName: System.Byte, Is this by design or a bug? If I look at the "RawContent" I see the header and the regular response I was expecting, but I really don't want to have to parse this text for my data.
Invoke-WebRequest -Uri $uri -Method GET -Headers $AppConfigHeaders -ContentType "application/json"
StatusCode : 200
StatusDescription : OK
Content : {123, 34, 105, 116…}
RawContent : HTTP/1.1 200 OK
Server: openresty/1.17.8.2
Date: Wed, 23 Sep 2020 23:02:12 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Sync-Token: zAJ0000000=0000000000000==;sn=2727261
x-ms-req…
Headers : {[Server, System.String[]], [Date, System.String[]], [Transfer-Encoding, System.String[]], [Connection, System.String[]]…}
RawContentLength : 2330
RelationLink : {}
Appreciate the help..
J
The text was updated successfully, but these errors were encountered: