四川做网站设计哪家好,中小企业网站建设与管理课后答案,网页设计ui设计,建设网校我正在尝试使用改进 2 使用其他 API#xff0c;我已经能够使用一些端点#xff0c;但注册端点不断返回 http 500 错误代码#xff0c;但在使用邮递员测试时工作正常。 POST(auth/signup/) Call addUser(Body SignUpCreds signUpCreds);这是注册凭据public class…我正在尝试使用改进 2 使用其他 API我已经能够使用一些端点但注册端点不断返回 http 500 错误代码但在使用邮递员测试时工作正常。 POST(auth/signup/) Call addUser(Body SignUpCreds signUpCreds);这是注册凭据public class SignUpCreds {SerializedName(username)Exposeprivate String username;SerializedName(email)Exposeprivate String email;SerializedName(password)Exposeprivate String password;public SignUpCreds(String username, String email, String password) {this.username username;this.email email;this.password password;}}这是注册响应public class SignUpResponce {SerializedName(id)Exposeprivate Integer id;SerializedName(username)Exposeprivate String username;SerializedName(email)Exposeprivate String email;SerializedName(password)Exposeprivate String password;SerializedName(dateRegistered)Exposeprivate Integer dateRegistered;public Integer getId() {return id;}public void setId(Integer id) {this.id id;}public String getUsername() {return username;}public void setUsername(String username) {this.username username;}public String getEmail() {return email;}public void setEmail(String email) {this.email email;}public String getPassword() {return password;}public void setPassword(String password) {this.password password;}public Integer getDateRegistered() {return dateRegistered;}public void setDateRegistered(Integer dateRegistered) {this.dateRegistered dateRegistered;}}邮递员中的 Json 对象{username: doe2jane,email: janeyahoo.com,password: janedoe}Json 在邮递员中的回应{id: 7,username: doe2jane,email: janeyahoo.com,password: janedoe,dateRegistered: 1499870604166}我的 signUpCredSignUpCreds creds new SignUpCreds(username, email, password);改造类public class AuthUtil {private static Retrofit sRetrofit null;public static Retrofit getRetrofit(String url){Gson gson new GsonBuilder().setLenient().create();if (sRetrofit null){sRetrofit new Retrofit.Builder().baseUrl(url).addConverterFactory(GsonConverterFactory.create(gson)).build();}return sRetrofit;}}