title: Error in sending data as multi form data in play /scala
body: <p>This is my code the same code is working in play 2.1.5 but I am unable to create war file in play 2.1.5 so I switched to play 2.4.3 and now in response it is coming that <code>400 bad request client</code> is sending wrong syntactically even post rest api is not hitting. Can some tell me what I am missing?</p>
  
  <pre><code>import play.api._
  import play.api.libs.ws._
  import play.api.mvc._
  //import javax.inject.Inject
  import play.api.Play.current
  import scala.concurrent.ExecutionContext.Implicits.global
  import play.api.libs.ws.WSAuthScheme
  import com.ning.http.client.AsyncHttpClient
  import com.ning.http.client.multipart.FilePart
  import com.ning.http.client.multipart.StringPart
  import java.io.File
  import org.apache.commons.codec.binary.Base64.encodeBase64
  
  class Application extends Controller {
  
    def index = Action {
      Ok(views.html.index("Your new application is ready."))
    }
  
  
  
  def postUpload=Action(parse.multipartFormData){request=&gt;
  
     val groupingType= request.body.dataParts("Grouping type").mkString
      val email=request.body.dataParts("NotificationRecepients").mkString
      val custId=request.body.dataParts("CustomerId").mkString
      val custIdFinal:Int=custId.toInt
  
  
     request.body.file("file").map { file =&gt;
  
    val file1=file.ref.file.getAbsolutePath;
  
  
    val fileName = file.filename 
      val contentType = file.contentType
  
    //file.ref.moveTo(new File("/home/kanchan/Desktop/"+fileName),true)
  
  
       val user = "myUser";
        val password = "myPassword";
  
   val encodedCredentials =
        new String(encodeBase64("%s:%s".format(user, password).getBytes))
  
      val asyncHttpClient:AsyncHttpClient =WS.client.underlying
      val postBuilder = asyncHttpClient.preparePost(url)
      val builder = postBuilder
        .addHeader("Authorization", "Basic " + encodedCredentials)
        .addBodyPart(new StringPart("selectedGroupType", "Functional Grouping", "UTF-8"))
        .addBodyPart(new StringPart("mailRecipients", "kancgupt@cisco.com", "UTF-8"))
        .addBodyPart(new StringPart("selectedFile", "Sample_group_upload_file.xlsx", "UTF-8"))
        .addBodyPart(new FilePart("file",new File("/home/kanchan/Downloads/Sample_group_upload_file.xlsx")))
  
      val response = asyncHttpClient.executeRequest(builder.build()).get();
     Ok(response.getResponseBody)
  
  
    }.getOrElse {
  
       Ok( "Missing file")
  
    }
  }
  }
  </code></pre>
  
  <p>Play version 2.4.3
  sbt:0.13.8</p>
  
  <p>getting following error:
  Apache Tomcat/6.0.39 - Error report <h1>HTTP Status 400 - Bad Request</h1><p><b>type</b> Status report</p><p><b>message</b> Bad Request</p><p><b>description</b> The request sent by the client was syntactically incorrect.</p><h3>Apache Tomcat/6.0.39</h3></p>