Class UploadMethod<VkResponse>
java.lang.Object
api.longpoll.bots.methods.impl.VkMethod<VkResponse>
api.longpoll.bots.methods.impl.upload.UploadMethod<VkResponse>
- Type Parameters:
VkResponse
- response type.
- Direct Known Subclasses:
UploadChatPhoto
,UploadDoc
,UploadPhoto
,UploadStory
Generic method that uploads files to VK server.
-
Constructor Summary
ConstructorsConstructorDescriptionUploadMethod
(String uploadUrl, String name, File file) UploadMethod
(String uploadUrl, String name, String filename, byte[] file) UploadMethod
(String uploadUrl, String name, String filename, InputStream inputStream) UploadMethod
(String uploadUrl, String name, Path file) -
Method Summary
Modifier and TypeMethodDescriptionprotected okhttp3.RequestBody
Supplies new request body.Methods inherited from class api.longpoll.bots.methods.impl.VkMethod
addParam, execute, executeAsync, getResponseClass, setLang
-
Constructor Details
-
UploadMethod
-
UploadMethod
-
UploadMethod
-
UploadMethod
-
-
Method Details
-
newRequestBody
protected okhttp3.RequestBody newRequestBody()Description copied from class:VkMethod
Supplies new request body.- Overrides:
newRequestBody
in classVkMethod<VkResponse>
- Returns:
- request body.
-