It creates problems for GraalVM native-image compiler and it is not a good practice to have an http request inside def.