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

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

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

HttpRequest.writePartHeader介绍

[英]Write part header
[中]写入部件标题

代码示例

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

/**
 * Write part header
 *
 * @param name
 * @param filename
 * @return this request
 * @throws IOException
 */
protected HttpRequest writePartHeader(final String name, final String filename)
    throws IOException {
  return writePartHeader(name, filename, null);
}

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

/**
 * Write part header
 *
 * @param name
 * @param filename
 * @return this request
 * @throws IOException
 */
protected HttpRequest writePartHeader(final String name, final String filename)
  throws IOException {
 return writePartHeader(name, filename, null);
}

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

/**
 * Write part header
 *
 * @param name
 * @param filename
 * @return this request
 * @throws IOException
 */
protected HttpRequest writePartHeader(final String name, final String filename)
    throws IOException {
  return writePartHeader(name, filename, null);
}

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

/**
 * Write part header
 *
 * @param name
 * @param filename
 * @return this request
 * @throws IOException
 */
protected HttpRequest writePartHeader(final String name, final String filename)
  throws IOException {
 return writePartHeader(name, filename, null);
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType
 *          value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
  final String contentType, final InputStream part)
  throws HttpRequestException {
 try {
  startPart();
  writePartHeader(name, filename, contentType);
  copy(part, output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
            final String contentType, final String part) throws HttpRequestException {
  try {
    startPart();
    writePartHeader(name, filename, contentType);
    output.write(part);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType
 *          value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
  final String contentType, final String part) throws HttpRequestException {
 try {
  startPart();
  writePartHeader(name, filename, contentType);
  output.write(part);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType
 *          value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
            final String contentType, final String part) throws HttpRequestException {
  try {
    startPart();
    writePartHeader(name, filename, contentType);
    output.write(part);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
            final String contentType, final InputStream part)
    throws HttpRequestException {
  try {
    startPart();
    writePartHeader(name, filename, contentType);
    copy(part, output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType
 *          value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
  final String contentType, final String part) throws HttpRequestException {
 try {
  startPart();
  writePartHeader(name, filename, contentType);
  output.write(part);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType
 *          value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
            final String contentType, final InputStream part)
    throws HttpRequestException {
  try {
    startPart();
    writePartHeader(name, filename, contentType);
    copy(part, output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return this;
}

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

/**
 * Write part of a multipart request to the request body
 *
 * @param name
 * @param filename
 * @param contentType
 *          value of the Content-Type part header
 * @param part
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest part(final String name, final String filename,
  final String contentType, final InputStream part)
  throws HttpRequestException {
 try {
  startPart();
  writePartHeader(name, filename, contentType);
  copy(part, output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return this;
}

相关文章

HttpRequest类方法