HTTP API Request Using Java For Android

后端 未结 2 986
傲寒
傲寒 2020-12-10 09:45

I found an API for which I want to play as I am free. I want to ask if I want to develop Android app using the API and the API is HTTP protocol based (RESTful), how can I us

2条回答
  •  误落风尘
    2020-12-10 10:39

    REST is much more strict about the formats you use vs. older SOAP methods.

    If you want to pass a single string or something like that, I suggest using JSON within REST. REST with XML is used for more complex structures like nested XML payloads and that sort of thing. JSON will also likely be much faster. There is built in support for JSON in Android, as well.

提交回复
热议问题