sendVideo.validate(); try { String url = getBaseUrl() + SendVideo.PATH; builder.setLaxMode(); builder.setCharset(StandardCharsets.UTF_8); builder.addTextBody(SendVideo.CHATID_FIELD, sendVideo.getChatId(), TEXT_PLAIN_CONTENT_TYPE); addInputFile(builder, sendVideo.getVideo(), SendVideo.VIDEO_FIELD, true); if (sendVideo.getReplyMarkup() != null) { builder.addTextBody(SendVideo.REPLYMARKUP_FIELD, objectMapper.writeValueAsString(sendVideo.getReplyMarkup()), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getReplyToMessageId() != null) { builder.addTextBody(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplyToMessageId().toString(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getCaption() != null) { builder.addTextBody(SendVideo.CAPTION_FIELD, sendVideo.getCaption(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getParseMode() != null) { builder.addTextBody(SendVideo.PARSEMODE_FIELD, sendVideo.getParseMode(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getSupportsStreaming() != null) { builder.addTextBody(SendVideo.SUPPORTSSTREAMING_FIELD, sendVideo.getSupportsStreaming().toString(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getDuration() != null) { builder.addTextBody(SendVideo.DURATION_FIELD, sendVideo.getDuration().toString(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getWidth() != null) { builder.addTextBody(SendVideo.WIDTH_FIELD, sendVideo.getWidth().toString(), TEXT_PLAIN_CONTENT_TYPE);
sendVideo.validate(); try { String url = getBaseUrl() + SendVideo.PATH; builder.setLaxMode(); builder.setCharset(StandardCharsets.UTF_8); builder.addTextBody(SendVideo.CHATID_FIELD, sendVideo.getChatId(), TEXT_PLAIN_CONTENT_TYPE); addInputFile(builder, sendVideo.getVideo(), SendVideo.VIDEO_FIELD, true); if (sendVideo.getReplyMarkup() != null) { builder.addTextBody(SendVideo.REPLYMARKUP_FIELD, objectMapper.writeValueAsString(sendVideo.getReplyMarkup()), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getReplyToMessageId() != null) { builder.addTextBody(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplyToMessageId().toString(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getCaption() != null) { builder.addTextBody(SendVideo.CAPTION_FIELD, sendVideo.getCaption(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getParseMode() != null) { builder.addTextBody(SendVideo.PARSEMODE_FIELD, sendVideo.getParseMode(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getSupportsStreaming() != null) { builder.addTextBody(SendVideo.SUPPORTSSTREAMING_FIELD, sendVideo.getSupportsStreaming().toString(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getDuration() != null) { builder.addTextBody(SendVideo.DURATION_FIELD, sendVideo.getDuration().toString(), TEXT_PLAIN_CONTENT_TYPE); if (sendVideo.getWidth() != null) { builder.addTextBody(SendVideo.WIDTH_FIELD, sendVideo.getWidth().toString(), TEXT_PLAIN_CONTENT_TYPE);