com.github.kevinsawicki.http.HttpRequest.part()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(258)

本文整理了Java中com.github.kevinsawicki.http.HttpRequest.part()方法的一些代码示例,展示了HttpRequest.part()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.part()方法的具体详情如下:
包路径:com.github.kevinsawicki.http.HttpRequest
类名称:HttpRequest
方法名:part

HttpRequest.part介绍

[英]Write part of a multipart request to the request body
[中]将多部分请求的一部分写入请求正文

代码示例

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final Number part)
  throws HttpRequestException {
 return part(name, null, part);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final File part)
  throws HttpRequestException {
 return part(name, null, part);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
  final String part) throws HttpRequestException {
 return part(name, filename, null, part);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
            final File part) throws HttpRequestException {
  return part(name, filename, null, part);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final File part)
  throws HttpRequestException {
 return part(name, null, part);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 */
public HttpRequest part(final String name, final String part) {
 return part(name, null, part);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final InputStream part)
  throws HttpRequestException {
 return part(name, null, null, part);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final Number part)
  throws HttpRequestException {
 return part(name, null, part);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final InputStream part)
  throws HttpRequestException {
 return part(name, null, null, part);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final Number part)
    throws HttpRequestException {
  return part(name, null, part);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final File part)
    throws HttpRequestException {
  return part(name, null, part);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final Number part)
    throws HttpRequestException {
  return part(name, null, part);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final InputStream part)
    throws HttpRequestException {
  return part(name, null, null, part);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 */
public HttpRequest part(final String name, final String part) {
  return part(name, null, part);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final File part)
    throws HttpRequestException {
  return part(name, null, part);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 */
public HttpRequest part(final String name, final String part) {
  return part(name, null, part);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final InputStream part)
    throws HttpRequestException {
  return part(name, null, null, part);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param part
 * @return this request
 */
public HttpRequest part(final String name, final String part) {
 return part(name, null, part);
}

代码示例来源:origin: stackoverflow.com

HttpRequest request = HttpRequest.post("http://google.com");
request.part("status[body]", "Making a multipart request");
request.part("status[image]", new File("/home/kevin/Pictures/ide.png"));
if (request.ok())
 System.out.println("Status was updated");

代码示例来源:origin: stackoverflow.com

HttpRequest request = HttpRequest.post("http://google.com");
request.part("status[body]", "Making a multipart request");//this is data
request.part("status[image]", new File("/home/kevin/Pictures/ide.png"));//this is your image
if (request.ok())
 System.out.println("Upload success");

相关文章

HttpRequest类方法