Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
726 views
in Technique[技术] by (71.8m points)

kotlin - Random code 400 (bad request) response from Retrofit 2 call in Android

I am using Retrofit 2 to communicate with a server. It works correctly sometimes, but occasionally (and quite often), it gives me response 400 (Bad request) to the same request. Usually I am getting bad request response after 4-5 consecutive call. I am using a loop to make continuous API call until list mark empty. Is there any idea why it’s happening and how I can fix this issue?

Thanks in advance


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...