Substituting variables into an implicit argument

Report a typo

Let's assume that there is a function in the scope that accepts an implicit header for the request:

def printRequest(request: String)(implicit header: String): Unit = println(s"$request,$header")

What will happen if we try to compile the following code?

val header: String = "Content-Type: text/html"
printRequest("data:42")(header)
Select one option from the list

Create a free account to access the full topic