2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2017 - ESI-Group - Cedric DELAMARRE
6 * This file is hereby licensed under the terms of the GNU GPL v2.0,
7 * pursuant to article 5.3.4 of the CeCILL v.2.1.
8 * This file was originally licensed under the terms of the CeCILL v2.1,
9 * and continues to be available under such terms.
10 * For more information, see the COPYING file which you should have received
11 * along with this program.
15 #ifndef __SCICURL_HXX__
16 #define __SCICURL_HXX__
18 #include <curl/curl.h>
21 #include "internal.hxx"
25 #include "dynlib_webtools.h"
28 class WEBTOOLS_IMPEXP SciCurl
31 static SciCurl* getInstance(void);
32 static void destroyInstance(void);
34 void getResultAsObject(CURL* curl);
35 void getResultAsFile(CURL* curl, FILE* fd);
36 int setProxy(CURL* curl);
37 void setCommonHeaders(CURL* curl);
39 types::InternalType* getResult(void);
42 static int write_result(char* pcInput, size_t size, size_t nmemb, void* output);
49 static std::string data;
53 #endif /* !__SCICURL_HXX__ */