wolflee
V2EX  ›  Android

Android 使用 RESTful API 是否是常规手段?

  •  
  •   wolflee · Jul 11, 2013 · 15660 views
    This topic created in 4760 days ago, the information mentioned may be changed or developed.
    最近在弄一个 API 的事情,本来准备全用 RESTful 的路由规则,但是 Android 开发那边说从来都是用 HttpConnection 还是什么的拼字符串,然后改 HTTP method,而且只用 GET 和 POST。
    想问一下 Android 使用 RESTful API 是否很费劲?或者运行效率低?
    我搜到 square 有 [retrofit](https://github.com/square/retrofit) 这么个东西。
    3 replies    1970-01-01 08:00:00 +08:00
    wolflee
        1
    wolflee  
    OP
       Jul 11, 2013
    无人问津啊,Android这么少人关注么
    yorkw
        2
    yorkw  
       Jul 11, 2013   ❤️ 1
    说用HttpConnection的纯属个人喜好,我自己就从来都是用httpclient的。

    没在自己的Android项目中用过restful,但经常能在SO上看到相关的问题,费不费劲见仁见智, 至于效率,任何API包括httpConnection用不好的话一样白瞎。

    给个SO链接, 关于[android] and [rest]的:
    http://stackoverflow.com/questions/3197335/restful-api-service/3197456#3197456
    darkway
        3
    darkway  
       Aug 3, 2013
    老鸟表示一点不费劲。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3055 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:03 · PVG 22:03 · LAX 07:03 · JFK 10:03
    ♥ Do have faith in what you're doing.