Post data from scala backend

Régis Foucault's Avatar

Régis Foucault

26 Jun, 2014 02:28 PM

Dear,

I try to post data from my play2 scala backend, but I always get "bad from data, cannot parse".

My request is the following :
var data = Json.obj(
"params" -> Json.obj( "auth" -> Json.obj( "key" -> "72cbd3e826ce42448163eb60e13d7b0e", "expires" -> "2014-06-26 13:46:33 UTC" ), "template_id" -> "4b62ee4dbb38455d96fe13d972ec3211" ) ) WS.url(url).withHeaders("Content-Type" -> "multipart/form-data").post(data) map {response => println(response.body) }

Do you have any idea of the problem ?

Best regards,

Régis

  1. Support Staff 1 Posted by Kevin van Zonne... on 26 Jun, 2014 02:43 PM

    Kevin van Zonneveld's Avatar

    Hi Régis,

    While not familiar with Scala, are you sure this is multipart data? To me this looks like a regular post.

    Kind regards,
    Kevin

  2. 2 Posted by regisfoucault on 26 Jun, 2014 04:50 PM

    regisfoucault's Avatar

    Ok, thanks. You can close the question.

    I have not found a way to modify it from public to private.

    Regards,

    --
    Régis Foucault
    +336 85 36 88 20

  3. Support Staff 3 Posted by Tim Koschützki on 02 Jul, 2014 09:23 AM

    Tim Koschützki's Avatar

    Alright, closing this!

    Kind regards,
    Tim

    Co-Founder Transloadit
    @tim_kos

  4. Tim Koschützki closed this discussion on 02 Jul, 2014 09:23 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

20 Nov, 2016 02:52 AM
29 Oct, 2015 05:01 AM
27 Oct, 2015 05:01 AM
27 Oct, 2015 05:01 AM
26 Oct, 2015 05:03 AM

 

26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:01 AM