Форум » [x]Harbour » libcurl в Harbour, возможно ли? » Ответить

libcurl в Harbour, возможно ли?

Dr. Oldwarez: Я уже довольно поработал с включением curl, а также httpie в программу. Хотелось бы попробовать включить это прямо через библиотеку, чтобы не плодить зависимые EXEшники, на стыках между которыми появляются ошибки. Подскажите, пожалуйста, где найти libcurl для Harbour с мануалами?

Ответов - 34, стр: 1 2 All

Dr. Oldwarez: Dima пишет: BCC какой 55 или 58 ? BCC58

Dima: Dr. Oldwarez Все работает по ходу , внимательнее наверное надо быть Счас пример будет , собирается и пашет

Dima: [pre2] Compile.bat call ..\..\..\batch\compile.bat demo %1 /c /l hbcurl /l libcurl %2 %3 %4 %5 %6 %7 %8 %9 [/pre2] [pre2] Demo.prg #include "hbcurl.ch" PROCEDURE Main Test() wait return nil Func Test() LOCAL curl LOCAL info LOCAL tmp LOCAL tmp1 LOCAL f LOCAL a LOCAL lVerbose := .F. ? curl_version() ? curl_getdate( "Sun, 1 Jun 2008 02:10:58 +0200" ) info := curl_version_info() FOR tmp := 1 TO Len( info ) IF tmp == 8 ? tmp, "" FOR tmp1 := 1 TO Len( info[ 8 ] ) ?? info[ 8 ][ tmp1 ] + " " NEXT ELSE ? tmp, info[ tmp ] ENDIF NEXT return nil [/pre2] + должны быть доступны hbcurl.ch libcurl.dll PS Остальные "штуки" где нужен curl_global_init() curl_easy_init() сам уже чекай


Dr. Oldwarez: Dima пишет: + должны быть доступны hbcurl.ch libcurl.dll А где эту libcurl.dll и libssl.dll скачать? В остальном оно уже закомпилировалось. Теперь dllки спрашивает.

Dima: Dr. Oldwarez пишет: libssl.dll Да это и не надо вовсе для сборки , у меня нет такой DLL в папке с примером да и вообще и работает LibCurl.dll есть в этом архиве https://curl.se/windows/dl-7.81.0/curl-7.81.0-win32-mingw.zip alkresin выше про это писал , если читал конечно

alkresin: Сделал маленький пример: http://www.kresin.ru/down/testcurl.zip - скачивание страницы. Для bcc 5.5.

Dr. Oldwarez: Dima пишет: Dr. Oldwarez пишет:  цитата: libssl.dll Да это и не надо вовсе для сборки , у меня нет такой DLL в папке с примером да и вообще и работает LibCurl.dll есть в этом архиве https://curl.se/windows/dl-7.81.0/curl-7.81.0-win32-mingw.zip alkresin выше про это писал , если читал конечно Я читал, но та libcurl, которая была в дистре MiniGUI, требовала libssl. Когда взял libcurl из вашей библиотеки, libssl уже не нужна. Теперь другой вопрос: как в libcurl назначить XML для вывода. Типа curl -o qwerty.xml

Dima: Dr. Oldwarez пишет: как в libcurl назначить XML для вывода "Курить" доку , там и примеры есть Как вариант "курить" гугл

Dr. Oldwarez: Итак, было [pre2]curl -k -o qwerty.xml --user USRNAME:PASSWD -X PROPFIND [/pre2]"https://webmail.aaabbbb.com/rpc.php/calendars/usrname@aaabbbb.com/calendar~GhGVum1xQexaffEfhiAkMN7/" Добавил ключ --libcurl Сгенерилось [pre2] #include <curl/curl.h> int main(int argc, char *argv[]) { CURLcode ret; CURL *hnd; hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L); curl_easy_setopt(hnd, CURLOPT_URL, "https://webmail.aaabbbb.com/rpc.php/calendars/usrname@aaabbbb.com/calendar~GhGVum1xQexaffEfhiAkMN7/"); curl_easy_setopt(hnd, CURLOPT_USERPWD, "USRNAME:PASSWD"); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.55.1"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PROPFIND"); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); /* Here is a list of options the curl code used that cannot get generated as source easily. You may select to either not use them or implement them yourself. CURLOPT_WRITEDATA set to a objectpointer CURLOPT_INTERLEAVEDATA set to a objectpointer CURLOPT_WRITEFUNCTION set to a functionpointer CURLOPT_READDATA set to a objectpointer CURLOPT_READFUNCTION set to a functionpointer CURLOPT_SEEKDATA set to a objectpointer CURLOPT_SEEKFUNCTION set to a functionpointer CURLOPT_ERRORBUFFER set to a objectpointer CURLOPT_STDERR set to a objectpointer CURLOPT_HEADERFUNCTION set to a functionpointer CURLOPT_HEADERDATA set to a objectpointer */ ret = curl_easy_perform(hnd); curl_easy_cleanup(hnd); hnd = NULL; return (int)ret; } /**** End of sample code ****/[/pre2] Я так понимаю, что это должно быть WRITEDATA, но его нет в опциях libcurl, которые я подсмотрел в HBCURL.CH [pre2]/* #ifndef HBCURL_CH_ #define HBCURL_CH_ #define HB_CURLOPT_FILE 1 #define HB_CURLOPT_URL 2 #define HB_CURLOPT_PORT 3 #define HB_CURLOPT_PROXY 4 #define HB_CURLOPT_USERPWD 5 #define HB_CURLOPT_PROXYUSERPWD 6 #define HB_CURLOPT_RANGE 7 #define HB_CURLOPT_INFILE 9 #define HB_CURLOPT_ERRORBUFFER 10 #define HB_CURLOPT_WRITEFUNCTION 11 #define HB_CURLOPT_READFUNCTION 12 #define HB_CURLOPT_TIMEOUT 13 #define HB_CURLOPT_INFILESIZE 14 #define HB_CURLOPT_POSTFIELDS 15 #define HB_CURLOPT_REFERER 16 #define HB_CURLOPT_FTPPORT 17 #define HB_CURLOPT_USERAGENT 18 #define HB_CURLOPT_LOW_SPEED_LIMIT 19 #define HB_CURLOPT_LOW_SPEED_TIME 20 #define HB_CURLOPT_RESUME_FROM 21 #define HB_CURLOPT_COOKIE 22 #define HB_CURLOPT_HTTPHEADER 23 #define HB_CURLOPT_HTTPPOST 24 #define HB_CURLOPT_SSLCERT 25 #define HB_CURLOPT_KEYPASSWD 26 #define HB_CURLOPT_SSLCERTPASSWD HB_CURLOPT_KEYPASSWD #define HB_CURLOPT_SSLKEYPASSWD HB_CURLOPT_KEYPASSWD #define HB_CURLOPT_CRLF 27 #define HB_CURLOPT_QUOTE 28 #define HB_CURLOPT_WRITEHEADER 29 #define HB_CURLOPT_COOKIEFILE 31 #define HB_CURLOPT_SSLVERSION 32 #define HB_CURLOPT_TIMECONDITION 33 #define HB_CURLOPT_TIMEVALUE 34 #define HB_CURLOPT_CUSTOMREQUEST 36 #define HB_CURLOPT_STDERR 37 #define HB_CURLOPT_POSTQUOTE 39 #define HB_CURLOPT_WRITEINFO 40 #define HB_CURLOPT_VERBOSE 41 /* talk a lot */ #define HB_CURLOPT_HEADER 42 /* throw the header out too */ #define HB_CURLOPT_NOPROGRESS 43 /* shut off the progress meter */ #define HB_CURLOPT_NOBODY 44 /* use HEAD to get http document */ #define HB_CURLOPT_FAILONERROR 45 /* no output on http error codes >= 300 */ #define HB_CURLOPT_UPLOAD 46 /* this is an upload */ #define HB_CURLOPT_POST 47 /* HTTP POST method */ #define HB_CURLOPT_DIRLISTONLY 48 /* Use NLST when listing ftp dir */ #define HB_CURLOPT_FTPLISTONLY HB_CURLOPT_DIRLISTONLY #define HB_CURLOPT_APPEND 50 /* Append instead of overwrite on upload! */ #define HB_CURLOPT_FTPAPPEND HB_CURLOPT_APPEND #define HB_CURLOPT_NETRC 51 #define HB_CURLOPT_FOLLOWLOCATION 52 /* use Location: Luke! */ #define HB_CURLOPT_TRANSFERTEXT 53 /* transfer data in text/ASCII format */ #define HB_CURLOPT_PUT 54 /* HTTP PUT */ #define HB_CURLOPT_PROGRESSFUNCTION 56 #define HB_CURLOPT_PROGRESSDATA 57 #define HB_CURLOPT_AUTOREFERER 58 #define HB_CURLOPT_PROXYPORT 59 #define HB_CURLOPT_POSTFIELDSIZE 60 #define HB_CURLOPT_HTTPPROXYTUNNEL 61 #define HB_CURLOPT_INTERFACE 62 #define HB_CURLOPT_KRBLEVEL 63 #define HB_CURLOPT_KRB4LEVEL HB_CURLOPT_KRBLEVEL #define HB_CURLOPT_SSL_VERIFYPEER 64 #define HB_CURLOPT_CAINFO 65 #define HB_CURLOPT_MAXREDIRS 68 #define HB_CURLOPT_FILETIME 69 #define HB_CURLOPT_TELNETOPTIONS 70 #define HB_CURLOPT_MAXCONNECTS 71 #define HB_CURLOPT_CLOSEPOLICY 72 #define HB_CURLOPT_FRESH_CONNECT 74 #define HB_CURLOPT_FORBID_REUSE 75 #define HB_CURLOPT_RANDOM_FILE 76 #define HB_CURLOPT_EGDSOCKET 77 #define HB_CURLOPT_CONNECTTIMEOUT 78 #define HB_CURLOPT_HEADERFUNCTION 79 #define HB_CURLOPT_HTTPGET 80 #define HB_CURLOPT_SSL_VERIFYHOST 81 #define HB_CURLOPT_COOKIEJAR 82 #define HB_CURLOPT_SSL_CIPHER_LIST 83 #define HB_CURLOPT_HTTP_VERSION 84 #define HB_CURLOPT_FTP_USE_EPSV 85 #define HB_CURLOPT_SSLCERTTYPE 86 #define HB_CURLOPT_SSLKEY 87 #define HB_CURLOPT_SSLKEYTYPE 88 #define HB_CURLOPT_SSLENGINE 89 #define HB_CURLOPT_SSLENGINE_DEFAULT 90 #define HB_CURLOPT_DNS_USE_GLOBAL_CACHE 91 /* To become OBSOLETE soon */ #define HB_CURLOPT_DNS_CACHE_TIMEOUT 92 #define HB_CURLOPT_PREQUOTE 93 #define HB_CURLOPT_DEBUGFUNCTION 94 #define HB_CURLOPT_DEBUGDATA 95 #define HB_CURLOPT_COOKIESESSION 96 #define HB_CURLOPT_CAPATH 97 #define HB_CURLOPT_BUFFERSIZE 98 #define HB_CURLOPT_NOSIGNAL 99 #define HB_CURLOPT_SHARE 100 #define HB_CURLOPT_PROXYTYPE 101 #define HB_CURLOPT_ACCEPT_ENCODING 102 #define HB_CURLOPT_ENCODING HB_CURLOPT_ACCEPT_ENCODING #define HB_CURLOPT_PRIVATE 103 #define HB_CURLOPT_HTTP200ALIASES 104 #define HB_CURLOPT_UNRESTRICTED_AUTH 105 #define HB_CURLOPT_FTP_USE_EPRT 106 #define HB_CURLOPT_HTTPAUTH 107 #define HB_CURLOPT_SSL_CTX_FUNCTION 108 #define HB_CURLOPT_SSL_CTX_DATA 109 #define HB_CURLOPT_FTP_CREATE_MISSING_DIRS 110 #define HB_CURLOPT_PROXYAUTH 111 #define HB_CURLOPT_FTP_RESPONSE_TIMEOUT 112 #define HB_CURLOPT_IPRESOLVE 113 #define HB_CURLOPT_MAXFILESIZE 114 #define HB_CURLOPT_INFILESIZE_LARGE 115 #define HB_CURLOPT_RESUME_FROM_LARGE 116 #define HB_CURLOPT_MAXFILESIZE_LARGE 117 #define HB_CURLOPT_NETRC_FILE 118 #define HB_CURLOPT_USE_SSL 119 #define HB_CURLOPT_FTP_SSL HB_CURLOPT_USE_SSL #define HB_CURLOPT_POSTFIELDSIZE_LARGE 120 #define HB_CURLOPT_TCP_NODELAY 121 #define HB_CURLOPT_SOURCE_USERPWD 123 #define HB_CURLOPT_SOURCE_PREQUOTE 127 #define HB_CURLOPT_SOURCE_POSTQUOTE 128 #define HB_CURLOPT_FTPSSLAUTH 129 #define HB_CURLOPT_IOCTLFUNCTION 130 #define HB_CURLOPT_IOCTLDATA 131 #define HB_CURLOPT_SOURCE_URL 132 #define HB_CURLOPT_SOURCE_QUOTE 133 #define HB_CURLOPT_FTP_ACCOUNT 134 #define HB_CURLOPT_COOKIELIST 135 #define HB_CURLOPT_IGNORE_CONTENT_LENGTH 136 #define HB_CURLOPT_FTP_SKIP_PASV_IP 137 #define HB_CURLOPT_FTP_FILEMETHOD 138 #define HB_CURLOPT_LOCALPORT 139 #define HB_CURLOPT_LOCALPORTRANGE 140 #define HB_CURLOPT_CONNECT_ONLY 141 #define HB_CURLOPT_CONV_FROM_NETWORK_FUNCTION 142 #define HB_CURLOPT_CONV_TO_NETWORK_FUNCTION 143 #define HB_CURLOPT_CONV_FROM_UTF8_FUNCTION 144 #define HB_CURLOPT_MAX_SEND_SPEED_LARGE 145 #define HB_CURLOPT_MAX_RECV_SPEED_LARGE 146 #define HB_CURLOPT_FTP_ALTERNATIVE_TO_USER 147 #define HB_CURLOPT_SOCKOPTFUNCTION 148 #define HB_CURLOPT_SOCKOPTDATA 149 #define HB_CURLOPT_SSL_SESSIONID_CACHE 150 #define HB_CURLOPT_SSH_AUTH_TYPES 151 #define HB_CURLOPT_SSH_PUBLIC_KEYFILE 152 #define HB_CURLOPT_SSH_PRIVATE_KEYFILE 153 #define HB_CURLOPT_FTP_SSL_CCC 154 #define HB_CURLOPT_TIMEOUT_MS 155 #define HB_CURLOPT_CONNECTTIMEOUT_MS 156 #define HB_CURLOPT_HTTP_TRANSFER_DECODING 157 #define HB_CURLOPT_HTTP_CONTENT_DECODING 158 #define HB_CURLOPT_NEW_FILE_PERMS 159 #define HB_CURLOPT_NEW_DIRECTORY_PERMS 160 #define HB_CURLOPT_POST301 161 #define HB_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 162 #define HB_CURLOPT_OPENSOCKETFUNCTION 163 #define HB_CURLOPT_OPENSOCKETDATA 164 #define HB_CURLOPT_COPYPOSTFIELDS 165 #define HB_CURLOPT_PROXY_TRANSFER_MODE 166 #define HB_CURLOPT_SEEKFUNCTION 167 #define HB_CURLOPT_SEEKDATA 168 #define HB_CURLOPT_CRLFILE 169 #define HB_CURLOPT_ISSUERCERT 170 #define HB_CURLOPT_ADDRESS_SCOPE 171 #define HB_CURLOPT_CERTINFO 172 #define HB_CURLOPT_POSTREDIR HB_CURLOPT_POST301 #define HB_CURLOPT_USERNAME 173 #define HB_CURLOPT_PASSWORD 174 #define HB_CURLOPT_PROXYUSERNAME 175 #define HB_CURLOPT_PROXYPASSWORD 176 #define HB_CURLOPT_NOPROXY 177 #define HB_CURLOPT_TFTP_BLKSIZE 178 #define HB_CURLOPT_SOCKS5_GSSAPI_SERVICE 179 #define HB_CURLOPT_SOCKS5_GSSAPI_NEC 180 #define HB_CURLOPT_PROTOCOLS 181 #define HB_CURLOPT_REDIR_PROTOCOLS 182 #define HB_CURLOPT_SSH_KNOWNHOSTS 183 #define HB_CURLOPT_MAIL_FROM 186 #define HB_CURLOPT_MAIL_RCPT 187 #define HB_CURLOPT_FTP_USE_PRET 188 #define HB_CURLOPT_RTSP_REQUEST 189 #define HB_CURLOPT_RTSP_SESSION_ID 190 #define HB_CURLOPT_RTSP_STREAM_URI 191 #define HB_CURLOPT_RTSP_TRANSPORT 192 #define HB_CURLOPT_RTSP_HEADER HB_CURLOPT_HTTPHEADER #define HB_CURLOPT_RTSP_CLIENT_CSEQ 193 #define HB_CURLOPT_RTSP_SERVER_CSEQ 194 #define HB_CURLOPT_WILDCARDMATCH 197 #define HB_CURLOPT_RESOLVE 198 #define HB_CURLOPT_TRANSFER_ENCODING 199 #define HB_CURLOPT_GSSAPI_DELEGATION 200 #define HB_CURLOPT_DNS_SERVERS 201 #define HB_CURLOPT_ACCEPTTIMEOUT_MS 202 #define HB_CURLOPT_SSL_OPTIONS 203 #define HB_CURLOPT_TCP_KEEPALIVE 204 #define HB_CURLOPT_TCP_KEEPIDLE 205 #define HB_CURLOPT_TCP_KEEPINTVL 206 #define HB_CURLOPT_MAIL_AUTH 207 #define HB_CURLOPT_DOWNLOAD 1001 /* Harbour special ones */ #define HB_CURLOPT_PROGRESSBLOCK 1002 #define HB_CURLOPT_UL_FILE_SETUP 1003 #define HB_CURLOPT_UL_FILE_CLOSE 1004 #define HB_CURLOPT_DL_FILE_SETUP 1005 #define HB_CURLOPT_DL_FILE_CLOSE 1006 #define HB_CURLOPT_UL_BUFF_SETUP 1007 #define HB_CURLOPT_DL_BUFF_SETUP 1008 #define HB_CURLOPT_DL_BUFF_GET 1009 #define HB_CURLOPT_UL_NULL_SETUP 1010 #define HB_CURLOPT_UL_FHANDLE_SETUP 1011 #define HB_CURLOPT_DL_FHANDLE_SETUP 1012 /* Compatibility ones. Please don't use these. */ #define HB_CURLOPT_SETUPLOADFILE HB_CURLOPT_UL_FILE_SETUP #define HB_CURLOPT_CLOSEUPLOADFILE HB_CURLOPT_UL_FILE_CLOSE #define HB_CURLOPT_SETDOWNLOADFILE HB_CURLOPT_DL_FILE_SETUP #define HB_CURLOPT_CLOSEDOWNLOADFILE HB_CURLOPT_DL_FILE_CLOSE #define HB_CURLOPT_SETPROGRESS HB_CURLOPT_PROGRESSBLOCK /* HB_CURLOPT_PROXYTYPE option */ #define HB_CURLPROXY_HTTP 0 /* added in 7.10 */ #define HB_CURLPROXY_HTTP_1_0 1 /* added in 7.19.4, force to use CONNECT HTTP/1.0 */ #define HB_CURLPROXY_SOCKS4 4 /* support added in 7.15.2, enum existed already in 7.10 */ #define HB_CURLPROXY_SOCKS5 5 /* added in 7.10 */ #define HB_CURLPROXY_SOCKS4A 6 /* added in 7.18.0 */ #define HB_CURLPROXY_SOCKS5_HOSTNAME 7 /* Use the SOCKS5 protocol but pass along the host name rather than the IP address. added in 7.18.0 */ /* HB_CURLOPT_NETRC option */ #define HB_CURL_NETRC_IGNORED 0 /* The .netrc will never be read. */ #define HB_CURL_NETRC_OPTIONAL 1 /* A user:password in the URL will be preferred */ #define HB_CURL_NETRC_REQUIRED 2 /* A user:password in the URL will be ignored. */ /* HB_CURLOPT_SSL_OPTIONS values */ #define HB_CURLSSLOPT_ALLOW_BEAST hb_bitShift( 1, 0 ) /* HB_CURLOPT_HTTPAUTH option */ #define HB_CURLAUTH_NONE 0 /* nothing */ #define HB_CURLAUTH_BASIC 1 /* Basic (default) */ #define HB_CURLAUTH_DIGEST 2 /* Digest */ #define HB_CURLAUTH_GSSNEGOTIATE 4 /* GSS-Negotiate */ #define HB_CURLAUTH_NTLM 8 /* NTLM */ #define HB_CURLAUTH_DIGEST_IE hb_bitShift( 1, 4 ) /* Digest with IE flavour */ #define HB_CURLAUTH_NTLM_WB hb_bitShift( 1, 5 ) /* NTLM delegating to winbind helper */ #define HB_CURLAUTH_ONLY hb_bitShift( 1, 31 ) /* used together with a single other type to force no auth or just that single type */ #define HB_CURLAUTH_ANY hb_bitNot( 0 ) /* all types set */ #define HB_CURLAUTH_ANYSAFE hb_bitNot( hb_bitOr( HB_CURLAUTH_BASIC, HB_CURLAUTH_DIGEST_IE ) ) /* HB_CURLOPT_HTTP_VERSION option */ #define HB_CURL_HTTP_VERSION_NONE 0 /* setting this means we don't care, and that we'd like the library to choose the best possible for us! */ #define HB_CURL_HTTP_VERSION_1_0 1 /* please use HTTP 1.0 in the request */ #define HB_CURL_HTTP_VERSION_1_1 2 /* please use HTTP 1.1 in the request */ /* HB_CURLOPT_USE_SSL option */ #define HB_CURLUSESSL_NONE 0 /* do not attempt to use SSL */ #define HB_CURLUSESSL_TRY 1 /* try using SSL, proceed anyway otherwise */ #define HB_CURLUSESSL_CONTROL 2 /* SSL for the control connection or fail */ #define HB_CURLUSESSL_ALL 3 /* SSL for all communication or fail */ /* HB_CURLOPT_FTPSSLAUTH option */ #define HB_CURLFTPAUTH_DEFAULT 0 /* let libcurl decide */ #define HB_CURLFTPAUTH_SSL 1 /* use "AUTH SSL" */ #define HB_CURLFTPAUTH_TLS 2 /* use "AUTH TLS" */ /* HB_CURLOPT_FTP_SSL_CCC option */ #define HB_CURLFTPSSL_CCC_NONE 0 /* do not send CCC */ #define HB_CURLFTPSSL_CCC_PASSIVE 1 /* Let the server initiate the shutdown */ #define HB_CURLFTPSSL_CCC_ACTIVE 2 /* Initiate the shutdown */ /* HB_CURLOPT_FTP_FILEMETHOD option */ #define HB_CURLFTPMETHOD_DEFAULT 0 /* let libcurl pick */ #define HB_CURLFTPMETHOD_MULTICWD 1 /* single CWD operation for each path part */ #define HB_CURLFTPMETHOD_NOCWD 2 /* no CWD at all */ #define HB_CURLFTPMETHOD_SINGLECWD 3 /* one CWD to full dir, then work on file */ /* HB_CURLOPT_FTP_CREATE_MISSING_DIRS option */ #define HB_CURLFTP_CREATE_DIR_NONE 0 #define HB_CURLFTP_CREATE_DIR 1 #define HB_CURLFTP_CREATE_DIR_RETRY 2 /* HB_CURLOPT_RTSP_REQUEST option */ #define HB_CURL_RTSPREQ_NONE 0 #define HB_CURL_RTSPREQ_OPTIONS 1 #define HB_CURL_RTSPREQ_DESCRIBE 2 #define HB_CURL_RTSPREQ_ANNOUNCE 3 #define HB_CURL_RTSPREQ_SETUP 4 #define HB_CURL_RTSPREQ_PLAY 5 #define HB_CURL_RTSPREQ_PAUSE 6 #define HB_CURL_RTSPREQ_TEARDOWN 7 #define HB_CURL_RTSPREQ_GET_PARAMETER 8 #define HB_CURL_RTSPREQ_SET_PARAMETER 9 #define HB_CURL_RTSPREQ_RECORD 10 #define HB_CURL_RTSPREQ_RECEIVE 11 #define HB_CURL_RTSPREQ_LAST 12 /* HB_CURLOPT_TIMECONDITION option */ #define HB_CURL_TIMECOND_NONE 0 #define HB_CURL_TIMECOND_IFMODSINCE 1 #define HB_CURL_TIMECOND_IFUNMODSINCE 2 #define HB_CURL_TIMECOND_LASTMOD 3 /* HB_CURLOPT_IPRESOLVE option */ #define HB_CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP versions that your system allows */ #define HB_CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ #define HB_CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ /* HB_CURLOPT_SSLVERSION option */ #define HB_CURL_SSLVERSION_DEFAULT 0 #define HB_CURL_SSLVERSION_TLSv1 1 #define HB_CURL_SSLVERSION_SSLv2 2 #define HB_CURL_SSLVERSION_SSLv3 3 /* HB_CURLOPT_SSH_AUTH_TYPES option */ #define HB_CURL_CURLSSH_AUTH_ANY hb_bitNot( 0 ) /* all types supported by the server */ #define HB_CURL_CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ #define HB_CURL_CURLSSH_AUTH_PUBLICKEY 1 /* public/private key files */ #define HB_CURL_CURLSSH_AUTH_PASSWORD 2 /* password */ #define HB_CURL_CURLSSH_AUTH_HOST 4 /* host key files */ #define HB_CURL_CURLSSH_AUTH_KEYBOARD 8 /* keyboard interactive */ #define HB_CURL_CURLSSH_AUTH_DEFAULT HB_CURLSSH_AUTH_ANY /* CURLOPT_*PROTOCOLS options */ #define HB_CURLPROTO_HTTP hb_bitShift( 1, 0 ) #define HB_CURLPROTO_HTTPS hb_bitShift( 1, 1 ) #define HB_CURLPROTO_FTP hb_bitShift( 1, 2 ) #define HB_CURLPROTO_FTPS hb_bitShift( 1, 3 ) #define HB_CURLPROTO_SCP hb_bitShift( 1, 4 ) #define HB_CURLPROTO_SFTP hb_bitShift( 1, 5 ) #define HB_CURLPROTO_TELNET hb_bitShift( 1, 6 ) #define HB_CURLPROTO_LDAP hb_bitShift( 1, 7 ) #define HB_CURLPROTO_LDAPS hb_bitShift( 1, 8 ) #define HB_CURLPROTO_DICT hb_bitShift( 1, 9 ) #define HB_CURLPROTO_FILE hb_bitShift( 1, 10 ) #define HB_CURLPROTO_TFTP hb_bitShift( 1, 11 ) #define HB_CURLPROTO_IMAP hb_bitShift( 1, 12 ) #define HB_CURLPROTO_IMAPS hb_bitShift( 1, 13 ) #define HB_CURLPROTO_POP3 hb_bitShift( 1, 14 ) #define HB_CURLPROTO_POP3S hb_bitShift( 1, 15 ) #define HB_CURLPROTO_SMTP hb_bitShift( 1, 16 ) #define HB_CURLPROTO_SMTPS hb_bitShift( 1, 17 ) #define HB_CURLPROTO_RTSP hb_bitShift( 1, 18 ) #define HB_CURLPROTO_RTMP hb_bitShift( 1, 19 ) #define HB_CURLPROTO_RTMPT hb_bitShift( 1, 20 ) #define HB_CURLPROTO_RTMPE hb_bitShift( 1, 21 ) #define HB_CURLPROTO_RTMPTE hb_bitShift( 1, 22 ) #define HB_CURLPROTO_RTMPS hb_bitShift( 1, 23 ) #define HB_CURLPROTO_RTMPTS hb_bitShift( 1, 24 ) #define HB_CURLPROTO_ALL hb_bitNot( 0 ) /* curl_easy_pause() parameters. They can be combined with hb_bitOr(). */ #define HB_CURLPAUSE_RECV 1 #define HB_CURLPAUSE_RECV_CONT 0 #define HB_CURLPAUSE_SEND 4 #define HB_CURLPAUSE_SEND_CONT 0 #define HB_CURLPAUSE_ALL hb_bitOr( HB_CURLPAUSE_RECV, HB_CURLPAUSE_SEND ) #define HB_CURLPAUSE_CONT hb_bitOr( HB_CURLPAUSE_RECV_CONT, HB_CURLPAUSE_SEND_CONT ) /* curl_global_init() parameters. */ #define HB_CURL_GLOBAL_SSL 1 #define HB_CURL_GLOBAL_WIN32 2 #define HB_CURL_GLOBAL_ALL hb_bitOr( HB_CURL_GLOBAL_SSL, HB_CURL_GLOBAL_WIN32 ) #define HB_CURL_GLOBAL_NOTHING 0 #define HB_CURL_GLOBAL_DEFAULT HB_CURL_GLOBAL_ALL [/pre2]

Dima: Dr. Oldwarez пишет: WRITEDATA Да нет такого......но может быть сайту можно как то сказать заранее что данные передавать в XML..

alkresin: Если надо именно задать формат, то это не к curl, это к сайту. А если надо задать определенный файл для вывода полученных данных, то можно так: curl_easy_setopt( hCurl, HB_CURLOPT_DL_BUFF_SETUP ) ... cBuff := curl_easy_dl_buff_get( hCurl ) hb_MemoWrite( "some_file.xml", cBuff )

Dima: -H "Content-Type: application/xml" что то типа такого для CURL.EXE а если DLL юзать то в Header надо это правильно вставить , вроде так

alkresin: Dima пишет: -H "Content-Type: application/xml" что то типа такого для CURL.EXE А это разве не для отправляемых данных строчка?

Dima: alkresin Да , возможно я поспешил с правильным ответом......



полная версия страницы