File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,7 +223,16 @@ public string ToString(string methodName)
223223 Headers . TryGetValue ( "Content-Type" , out var contentType ) &&
224224 contentType . StartsWith ( "application/json" , StringComparison . OrdinalIgnoreCase ) )
225225 {
226- debugMessageObject [ "response" ] [ "body" ] = JToken . Parse ( Encoding . UTF8 . GetString ( Data ) ) ;
226+ var decoded = Encoding . UTF8 . GetString ( Data ) ;
227+
228+ try
229+ {
230+ debugMessageObject [ "response" ] [ "body" ] = JToken . Parse ( decoded ) ;
231+ }
232+ catch
233+ {
234+ debugMessageObject [ "response" ] [ "body" ] = decoded ;
235+ }
227236 }
228237 }
229238 else
Original file line number Diff line number Diff line change 33 "displayName" : " Utilities.Rest" ,
44 "description" : " This package contains useful RESTful utilities for the Unity Game Engine." ,
55 "keywords" : [],
6- "version" : " 5.0.3 " ,
6+ "version" : " 5.0.4 " ,
77 "unity" : " 2021.3" ,
88 "documentationUrl" : " https://github.com/RageAgainstThePixel/com.utilities.rest#documentation" ,
99 "changelogUrl" : " https://github.com/RageAgainstThePixel/com.utilities.rest/releases" ,
You can’t perform that action at this time.
0 commit comments