Skip to content

Commit bb07dc1

Browse files
Dispatch properly for the UA on jsweb
1 parent 8da18f5 commit bb07dc1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/common/io/requests.effekt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,9 @@ def uri(uri: String): Unit / { RequestBuilder, Exception[WrongFormat] } = {
467467
}
468468

469469
def defaultHeaders(): Unit / RequestBuilder = {
470-
if(internal::backend() != "js-web"){
470+
internal::ifJSWeb{
471+
() // do not set a user agent
472+
}{
471473
do header("User-Agent", "Effekt-io-requests/0.1.0")
472474
}
473475
// TODO should we add more?

0 commit comments

Comments
 (0)