We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b907929 commit db056d1Copy full SHA for db056d1
1 file changed
src/web/fan/WebClient.fan
@@ -149,10 +149,11 @@ class WebClient
149
**
150
** Also see convenience methods: `resStr` and `resBuf`.
151
152
- InStream resIn()
+ InStream? resIn(Bool checked := true)
153
{
154
- if (resInStream == null) throw IOErr("No input stream for response $resCode")
155
- return resInStream
+ if (resInStream != null) return resInStream
+ if (checked) throw IOErr("No input stream for response $resCode")
156
+ return null
157
}
158
159
0 commit comments