android - How to avoid urlencode when retrofit post data?
漂亮男人
漂亮男人 2017-05-16 13:31:06
0
2
764
    @FormUrlEncoded
    @POST("abc/eft/ccc")
    Observable<BaseResponseBean> postURL(@Field(value="urlA", encoded=true) String urlA);

Regardless of encoded=true or encoded=false (default). The final result urlA passed up is converted by UrlEncode.

How can I post the original string directly?

I consulted some back-end personnel and said that under normal circumstances, post form data must require URLEncode. Otherwise, if there are & and the like, it is easy to have problems.
But mainland development is not so rigorous. We just require the original data to be transmitted.

漂亮男人
漂亮男人

reply all(2)
仅有的幸福

You can try it instead of using the form submission method and change it to json submission

PHPzhong

No method found. In the end, it can only be intercepted in the Interceptor and java.net.URLDecoder.decode("String to be decoded", "utf-8");

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!