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
At times when you pass the token and the default JSONDecoder is just not enough, then you may use the init method of the utility to pass the token and a custom JSONDecoder both to make the API request and parse the JSON response
The HUNetworkError structure provides in detail description beneficial for debugging purpose, given are the following properties that will be populated incase an error occurs
185
185
186
-
1. Status: This will contain the HTTPStatus code for the request (200)
187
-
2. ServerResponse: This will be the JSON string of the response you received from the server. (not to be confused with error parameter) on error if server returns the error JSON data that message will be decoded to human readable string.
188
-
3. RequestUrl: The request URL that you just called.
189
-
4. RequestBody: If you get failure on POST request this property would contain a string representation of the HTTPBody that was sent to the server.
190
-
5. Reason: This property would contain the debug description from the error closure parameter.
186
+
1. ### Status: This will contain the HTTPStatus code for the request (200)
187
+
188
+
2. ### ServerResponse: This will be the JSON string of the response you received from the server. (not to be confused with error parameter) on error if server returns the error JSON data that message will be decoded to human readable string.
189
+
190
+
3. ### RequestUrl: The request URL that you just called.
191
+
192
+
4. ### RequestBody: If you get failure on POST request this property would contain a string representation of the HTTPBody that was sent to the server.
193
+
194
+
5. ### Reason: This property would contain the debug description from the error closure parameter.
191
195
192
196
This utility isfor performing basic tasks, and is currently evolving, but if you have any specific feature in mind then please feel free to drop a request and I will try my best to implement it
0 commit comments