VKCOM / vk-java-sdk

Java library for working with VK API
MIT License
294 stars 155 forks source link

Target host is not specified #259

Closed paullarionov closed 2 years ago

paullarionov commented 2 years ago

Hi!

Code from example:

        File tempFile = getFile(file);
        GetWallUploadServerResponse serverResponse = vk.photos().getWallUploadServer(actor).execute();
        WallUploadResponse uploadResponse = vk.upload().photoWall(serverResponse.getUploadUrl().getPath(), tempFile).execute();
        List<SaveWallPhotoResponse> photoList = vk.photos().saveWallPhoto(actor, uploadResponse.getPhoto())
                .server(uploadResponse.getServer())
                .hash(uploadResponse.getHash())
                .execute();

Result is:

Caused by: org.apache.http.ProtocolException: Target host is not specified