title: kotlin how can I map parameters to LinkedMultiValueMap with the variable name and value
body: <p>So I have a function that has a lot of parameters like this</p>
  <pre><code>fun registerDomain(
      domain: String,
      period: String,
      dns1: String,
      dn2: String,
      registrant: String,
      admin: String,
      tech: String,
      billing: String
    ) {
      val request = LinkedMultiValueMap&lt;String, String&gt;()
      request.add(&quot;domain&quot;, domain)
      request.add(&quot;period&quot;, period)
      request.add(&quot;dns1&quot;, dns1)
      request.add(&quot;dns2&quot;, dn2)
      request.add(&quot;registrant&quot;, registrant)
      request.add(&quot;tech&quot;, tech)
      request.add(&quot;billing&quot;, billing)
      return _request(resources.DOMAIN, &quot;registerDomain&quot;, request)
    }
  </code></pre>
  <p>so in order to make a request I have to map these parameters to LinkedMultiValueMap for using in request body, but I'm tired of adding each of this manually and if it has more parameters it will make the code much more longer. so is there anyway to map parameters to LinkedMultiValueMap. I expect something like this</p>
  <pre><code>function registerDomain(parameters){
    val request = LinkedMultiValueMap&lt;String, String&gt;()
    for(param in parameters){
      request.add(::param.name, ::param.get())
    }
    return _request(Resources.DOMAIN, &quot;registerDomain&quot;, request)
  }
  </code></pre>
  <p>or is there anyway to make this code shorter.</p>