File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -478,9 +478,13 @@ namespace internal {
478
478
jsNode { "js-node" }
479
479
jsWeb { "js-web" }
480
480
481
- extern pure def ifNode [R]{ thnNode: => R }{ thnWeb : => R }: R =
481
+ extern pure def ifJSNode [R]{ thnNode: => R }{ els : => R }: R =
482
482
jsNode { thnNode() }
483
+ default { els() }
484
+ extern pure def ifJSWeb[R]{ thnWeb: => R }{ els: => R }: R =
483
485
jsWeb { thnWeb() }
486
+ default { els() }
487
+ extern pure def unsupported[R](): R =
484
488
}
485
489
486
490
/// Make a HTTP(S) request on the backend-specific implementation,
@@ -489,7 +493,9 @@ namespace internal {
489
493
/// The Request body is buffered, the response is streaming (as far
490
494
/// as the backend implementation allows).
491
495
def request[R]{ body: => Unit / RequestBuilder }{ res: {ResponseReader} => R }: R / Exception[RequestError] =
492
- internal::ifNode{ jsNode::request{body}{res} }{ jsWeb::request{body}{res} }
496
+ with internal::ifJSNode{ jsNode::request{body}{res} }
497
+ with internal::ifJSWeb{ jsWeb::request{body}{res} }
498
+ internal::unsupported[R]()
493
499
494
500
// Simple API
495
501
// ----------
You can’t perform that action at this time.
0 commit comments