Package com.mashape.unirest.request.body

Examples of com.mashape.unirest.request.body.MultipartBody


  public HttpRequestWithBody queryString(String name, Object value) {
    return (HttpRequestWithBody) super.queryString(name, value);
  }

  public MultipartBody field(String name, Object value) {
    MultipartBody body = new MultipartBody(this).field(name, (value == null) ? "" : value.toString());
    this.body = body;
    return body;
  }
View Full Code Here


    this.body = body;
    return body;
  }

  public MultipartBody field(String name, File file) {
    MultipartBody body = new MultipartBody(this).field(name, file);
    this.body = body;
    return body;
  }
View Full Code Here

    this.body = body;
    return body;
  }

  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());
        }
      }
    }
    this.body = body;
    return body;
View Full Code Here

TOP

Related Classes of com.mashape.unirest.request.body.MultipartBody

Copyright © 2018 www.massapicom. 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.