MultipartBody body = new MultipartBody.Builder()
.addFormDataPart("name","zf")
.addFormDataPart("word","123")
.addFormDataPart("mPhoto","pi.jpg",RequestBody.create(MediaType.parse("application/octet-stream"),file))
.build();
.addFormDataPart("name","zf")
.addFormDataPart("word","123")
.addFormDataPart("mPhoto","pi.jpg",RequestBody.create(MediaType.parse("application/octet-stream"),file))
.build();
2016-12-31
//构建POST请求Body;
RequestBody body = new FormBody.Builder()
.add("key", API_KEY)
.add("info", input.getText().toString())
.add("userid", USERID)
.build();
现在没有FormEncodingBuilder了。
RequestBody body = new FormBody.Builder()
.add("key", API_KEY)
.add("info", input.getText().toString())
.add("userid", USERID)
.build();
现在没有FormEncodingBuilder了。
2016-12-23