I'm not certain why, but for some reason the request variable is returned wrapped in a list, so this just gets the first element of that for query usage.