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

C Web API Examples

Primary Categories

CardConnect
Facebook
GeoOp
Jira
Microsoft Calendar
PayPal
Peoplevox

QuickBooks
Shopify
Stripe
SugarCRM
Twitter
VoiceBase
Walmart
Xero
eBay
effectconnect

 

 

 

(C) Download a Jira Attachment

Demonstrates how to download a Jira attachment to a file.

Chilkat C/C++ Library Downloads

MS Visual C/C++

Linux/CentOS C/C++

Alpine Linux C/C++

MAC OS X C/C++

armhf/aarch64 C/C++

C++ Builder

iOS C/C++

Android C/C++

Win Mobile 5.0/Pocket PC 2003

Solaris C/C++

FreeBSD C/C++

OpenBSD C/C++

MinGW C/C++

#include <C_CkHttp.h>

void ChilkatSample(void)
    {
    HCkHttp http;
    const char *url;
    const char *localFilePath;
    BOOL success;

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

    http = CkHttp_Create();

    CkHttp_putFollowRedirects(http,TRUE);

    // Provide the username/password for authentication
    CkHttp_putLogin(http,"jira@example.com");
    CkHttp_putPassword(http,"JIRA_API_TOKEN");

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

    url = "https://chilkat.atlassian.net/secure/attachment/10001/starfish.jpg";
    localFilePath = "qa_output/starfish.jpg";
    success = CkHttp_Download(http,url,localFilePath);
    if (success != TRUE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        CkHttp_Dispose(http);
        return;
    }

    printf("Successfully downloaded Jira attachment.\n");


    CkHttp_Dispose(http);

    }

 

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