Skip to content

Commit

Permalink
Revised Connection.data javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Nov 26, 2023
1 parent f49dd2c commit 00f85a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/jsoup/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,14 @@ default Connection newRequest(URL url) {
/**
* Add an input stream as a request data parameter. For GETs, has no effect, but for POSTS this will upload the
* input stream.
* <p>Use the {@link #data(String, String, InputStream, String)} method to set the uploaded file's mimetype.</p>
* @param key data key (form item name)
* @param filename the name of the file to present to the remove server. Typically just the name, not path,
* component.
* @param inputStream the input stream to upload, that you probably obtained from a {@link java.io.FileInputStream}.
* You must close the InputStream in a {@code finally} block.
* @return this Connection, for chaining
* @see #data(String, String, InputStream, String) if you want to set the uploaded file's mimetype.
* @see #data(String, String, InputStream, String)
*/
Connection data(String key, String filename, InputStream inputStream);

Expand Down

0 comments on commit 00f85a8

Please sign in to comment.