title: How to send Array & Set datatype data in AJAX call?
body: <p>I have this spring API</p>
  
  <pre><code>@RequestMapping(value="setentry/{userId}/{columnName}", method = RequestMethod.POST)
  public ResponseEntity&lt;?&gt; updateUserSetTypeFields(@PathVariable String userId, 
              @PathVariable String columnName, @RequestBody CollectionRequestParams entries ,
                  HttpServletRequest request)
  { 
  </code></pre>
  
  <p>Here is <code>CollectionRequestParams</code></p>
  
  <pre><code>public class CollectionRequestParams {
      private String[] arr;
      private Set set;
  
     // setter &amp; getter
  </code></pre>
  
  <p>I am trying to call this API as :</p>
  
  <pre><code>$.ajax({
                  url:"setEntry/123/111",
                  headers:{"X-AccessKey":"token","X-deviceId":"123"},
                  data:{"arr":['111','222']},
                  type:"POST",contentType:"application/json"
              })
  </code></pre>
  
  <p>This is throwing <code>HTTP status 400</code> My question is how can i pass arguments for <code>arr</code> &amp; <code>set</code> i.e sending <code>String[]</code> &amp; <code>Set</code> datatype data ?</p>