Package com.mashape.unirest.request.body

Examples of com.mashape.unirest.request.body.MultipartBody.field()


  public MultipartBody fields(Map<String, Object> parameters) {
    MultipartBody body =  new MultipartBody(this);
    if (parameters != null) {
      for(Entry<String, Object> param : parameters.entrySet()) {
        if (param.getValue() instanceof File) {
          body.field(param.getKey(), (File)param.getValue());
        } else {
          body.field(param.getKey(), (param.getValue() == null) ? "" : param.getValue().toString());
        }
      }
    }
View Full Code Here


    if (parameters != null) {
      for(Entry<String, Object> param : parameters.entrySet()) {
        if (param.getValue() instanceof File) {
          body.field(param.getKey(), (File)param.getValue());
        } else {
          body.field(param.getKey(), (param.getValue() == null) ? "" : param.getValue().toString());
        }
      }
    }
    this.body = body;
    return body;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.