Skip to content

Commit

Permalink
Correct README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Labazin authored and Artem Labazin committed Oct 3, 2018
1 parent 37893d3 commit 6d0a45a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -103,12 +103,12 @@ In the example above, the `sendPhoto` method uses the `photo` parameter using th

* `File` will use the File's extension to detect the `Content-Type`.
* `byte[]` will use `application/octet-stream` as `Content-Type`.
* `FormData` will use the `FormData`'s `Content-Type`.
* `FormData` will use the `FormData`'s `Content-Type` and `fileName`.

`FormData` is custom object that wraps a `byte[]` and defines a `Content-Type` like this:
`FormData` is custom object that wraps a `byte[]` and defines a `Content-Type` and `fileName` like this:

```java
FormData formData = new FormData("image/png", myDataAsByteArray);
FormData formData = new FormData("image/png", "filename.png", myDataAsByteArray);
someApi.sendPhoto(true, formData);
```

Expand Down

0 comments on commit 6d0a45a

Please sign in to comment.