Get String response body from retrofit2

后端 未结 3 1813
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-06 16:57

I am using retrofit1 old style

@GET(\"/loginUser\")
    public Call login(
            @Query(\"email\") String email,
            @Query(\"         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-06 17:33

    Retrofit 2.0.0-beta3 adds a converter-scalars module provides a Converter.Factory for converting String, the 8 primitive types, and the 8 boxed primitive types as text/plain bodies. Install this before your normal converter to avoid passing these simple scalars through, for example, a JSON converter.

提交回复
热议问题