vendredi 8 mai 2015

How to pass raw parameter using jsoup

I want to call an API which just accepts raw data when you send requests using jsoup.

My code looks like this:

Document res = Jsoup.connect(url)
        .header("Accept", "application/json")
        .header("X-Requested-With", "XMLHttpRequest")
        .data("name", "test", "room", "bedroom")
        .post();

But I know the above code is not right for passing raw data.

Can anybody tell me how can I do it?

Aucun commentaire:

Enregistrer un commentaire