FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Capturar el motivo del error petici贸n web (curl)
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Capturar el motivo del error petici贸n web (curl)
Posted: Sun Nov 06, 2022 01:59 PM
Amigo gracias por responder pero nada :(
Ahora esta devolviendo el error
Code (fw): Select all Collapse
SSL connect error
Code (fw): Select all Collapse
聽 聽 聽 聽 聽 聽 curl_global_init()
聽 聽 聽 聽 聽 聽 oCurl := curl_easy_init()
聽 聽 聽 聽 聽 聽 if !empty( oCurl )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_DEFAULT_PROTOCOL, "https" )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_URL, ::urlenvio )
聽 聽 聽 聽 聽 聽 聽 聽 AAdd( aHeaders, "authorization: Basic "+cBas64 ) 
聽 聽 聽 聽 聽 聽 聽 聽 AAdd( aHeaders, "content-type : application/json" ) 聽 
聽 聽 聽 聽 聽 聽 聽 聽 AAdd( aHeaders, "cache-control : no-cache" ) 聽 
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_CONNECTTIMEOUT , 100 )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_POST, 1)
聽 聽 聽 聽 聽 聽 聽 聽 //curl_easy_setopt( oCurl, HB_CURLOPT_CUSTOMREQUEST, "POST")
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_POSTFIELDS, ::cdnaJson )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_SSL_VERIFYHOST, .F. )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_DL_BUFF_SETUP )
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_setopt( oCurl, HB_CURLOPT_ENCODING, "UTF-8" )

聽 聽 聽 聽 聽 聽 聽 聽 cError := curl_easy_perform( oCurl )
聽 聽 聽 聽 聽 聽 聽 聽 if !Empty( cError )
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 MsgInfo( curl_easy_strerror( cError ), "Error" )
聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 cTexto 聽:= curl_easy_dl_buff_get( oCurl )
聽 聽 聽 聽 聽 聽 聽 聽 fw_memoedit( cTexto ) //Creo que aqui viene la respuesta 
聽 聽 聽 聽 聽 聽 聽 聽 curl_easy_reset( oCurl )
聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 curl_global_cleanup()
Saludos
LEANDRO AREVALO
Bogot谩 (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Capturar el motivo del error petici贸n web (curl)
Posted: Mon Nov 07, 2022 02:30 PM

Leandro, contacta conmigo por mail o skype

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion