Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Tcl Web API Examples

Primary Categories

CardConnect
Facebook
GeoOp
Jira
PayPal
Peoplevox
QuickBooks

Shopify
Stripe
SugarCRM
Twitter
VoiceBase
Walmart
Xero
eBay
effectconnect

 

 

 

(Tcl) Download a Jira Attachment

Demonstrates how to download a Jira attachment to a file.

Chilkat Tcl Extension Downloads

Chilkat Tcl Extension Downloads

load ./chilkat.dll

# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

CkHttp_put_FollowRedirects $http 1

# Provide the username/password for authentication
CkHttp_put_Login $http "jira@example.com"
CkHttp_put_Password $http "JIRA_API_TOKEN"

# The URL for a Jira attachment has this format: 
# https://your-domain.atlassian.net/secure/attachment/{attachment_id}/{attachment_filename}

set url "https://chilkat.atlassian.net/secure/attachment/10001/starfish.jpg"
set localFilePath "qa_output/starfish.jpg"
set success [CkHttp_Download $http $url $localFilePath]
if {[expr $success != 1]} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    exit
}

puts "Successfully downloaded Jira attachment."

delete_CkHttp $http

 

© 2000-2019 Chilkat Software, Inc. All Rights Reserved.