Thank you, Will.
The service I am trying to pull data from provides two links, one for login and another for the query. It looks like this:
val baseURL = “https://www.websitename.org”
val authenticationPath = “/ajaxauth/login”
val queryPath = “/basicdomaindata/query/class/tle/ABC/CDE”
val loginURL = baseURL+authenticationPath
val queryURL = baseURL+queryPath
So how best can I both authenticate and query the system? Do I issue two separate commands, one for login and another to query:
val wsRequest = ws.url(loginURL).withAuth(userName, password, WSAuthScheme.BASIC).execute()
val wsDataRequest = ws.url(queryURL).post(file)
Or is there a way to do both with one statement?
I appreciate your response and apologies if my questions are naive. I love coding in Scala but this is the first time working with reactive Lightbend framework.