I came here to ask my question after searching for 2 days !! My question is about REST api call and POST request on my api. I have already seen tutorial in JAVA about creating a httpclient in my side with httpsURLConnection to connect to the api and I did a POST request. It works for instance with https://www.example.com. BUT it did not work for the case below.
Case: (I have to do that in JAVA with eclipse) The REST API is accessible at https://test.api.kolibree.com. I get a client_id (=5) and a client_secret (= X7doOhLCRbuT0FIgBsmy) to access the API. First, to make an API call, I need to provide the http-x-client-idand http-x-client-sig headers. http-x-client-sigis computed using the absolute url of the request. (I managed to compute it)
Secondly: to connect to a Kolibree account using an email and a password, make a POST request to v1/accounts/request_token/ with body arguments email (=android.test@kolibree.com) and password (=test).
Problem: I don't know how to handle the client id and signature headers to do an API call. I haven't seen any tutorials talking about that. Furthermore, how to handle the email and password to do a POST request.
Thanks a lot for your kind attention. I would be infinitely thankful.
Alex