Encode query and args to bytes before `%`