android - RetrofitError: Part body must not be null -
i having retrofit api call. , getting retrofit error of part body cannot null. please help. have checked domain. having 1 more 'get' working fine
java code
typedstring role = new typedstring("both"); int fbregisterflag = 0; typedstring firstname = new typedstring("saurabh"); typedstring lastname = new typedstring("lahoti"); typedstring password = new typedstring("saurabh"); typedstring email = new typedstring("saurabh@clicklabs.edu"); typedstring mobile = new typedstring("9650076366"); typedstring college = new typedstring("dtu"); typedstring biodescription = new typedstring("dtu"); typedstring[] transcripts = {new typedstring("saurabh"), new typedstring("lahoti")}; int year = 2011; typedstring[] majors = {new typedstring("saurabh"), new typedstring("lahoti")}; typedstring[] minors = {new typedstring("saurabh"), new typedstring("lahoti")}; int[] availability = {1, 2, 3}; webservices.register(role, firstname, lastname, fbregisterflag, password, new typedstring("gsdf"), new typedstring("sdfsdf"), college, year, email, new typedstring("sdfsdf"), mobile, majors, minors, biodescription, transcripts, 0, availability, majors, new callback<string>() { @override public void success(string s, response response) { } @override public void failure(retrofiterror error) { } });
retrofit interface
public interface webservices { @multipart @post("/api/user/signup") void register(@part("role") typedstring role, @part("firstname") typedstring firstname, @part("lastname") typedstring lastname, @part("fbregisterflag") int fbflag, @part("password") typedstring password, @part("fbid") typedstring fbid, @part("profilepicture")typedstring profile, @part("college") typedstring college, @part("year") int year, @part("primaryemail") typedstring primaryemail, @part("facebookemail") typedstring fbemail, @part("mobilenumber") typedstring mobnumber, @part("majors") typedstring [] majors, @part("minors") typedstring [] minors, @part("biodescription") typedstring bio, @part("transcripts") typedstring [] transcripts, @part("fee") int fee, @part("availability") int [] availability, @part("courses") typedstring [] courses, callback <string> callback); }
Comments
Post a Comment