GithubHelp home page GithubHelp logo

marcianobarros20 / 4d-plugin-curl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gilst/4d-plugin-curl

0.0 2.0 0.0 8.86 MB

4D plugin implementation of libcurl and curl

C 68.76% C++ 25.06% Objective-C 5.57% HTML 0.61%

4d-plugin-curl's Introduction

4d-plugin-curl

This is a 4D plugin implementation of libcurl and cURL.

Important

This plugin project is a forked subset of what was published as OAuth.

Existing cURL@ commands have the same name and functionality, but their tokens (internal IDs) have changed.

To migrate existing methods, do the following:

  1. Comment the code that calls cURL@ plugin commands.
  2. Close 4DB.
  3. Replace the plugin.
  4. Uncomment the code.

New

cURL Get executable

Returns the path to the curl executable embedded in the plugin. You can use this with LAUNCH EXTERNAL PROCESS.

Example

version

$version:=cURL Get version 
  //libcurl/7.40.0 OpenSSL/1.0.1j zlib/1.2.8 libidn/1.29 libssh2/1.4.3

$path:=cURL Get executable 

$stdOut:=""
$stdIn:=""
$stdErr:=""

LAUNCH EXTERNAL PROCESS($path+" -V";$stdIn;$stdOut;$stdErr);
  //curl 7.40.0 (x86_64-apple-darwin14.0.0) libcurl/7.40.0 OpenSSL/1.0.1j zlib/1.2.8 libidn/1.29 libssh2/1.4.3\nProtocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp \nFeatures: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets \n

https

C_BLOB($in;$out)
C_LONGINT($err)
ARRAY LONGINT($tNomOption;0)
ARRAY TEXT($tValOption;0)
APPEND TO ARRAY($tNomOption;CURLOPT_SSL_VERIFYHOST)
APPEND TO ARRAY($tValOption;"1")

APPEND TO ARRAY($tNomOption;CURLOPT_SSL_VERIFYPEER)
APPEND TO ARRAY($tValOption;"1")
APPEND TO ARRAY($tNomOption;CURLOPT_CAINFO)
APPEND TO ARRAY($tValOption;Convert path system to POSIX(Get 4D folder(Current resources folder)+"cacert.pem"))

APPEND TO ARRAY($tNomOption;CURLOPT_DEBUGFUNCTION)
APPEND TO ARRAY($tValOption;"CB_DEBUG")

$err:=cURL ("https://github.com/";$tNomOption;$tValOption;$in;$out)

Version

  • v14 is for v14 and above, Windows & OS X 10.8+ 32/64 bits.
  • v11 is for v11 and above, Windows 32/64 bits, OS X 10.6+ 32 bits (Intel only)

Dependencies

Mac OS X

  • libcurl/7.40.0
  • OpenSSL/1.0.1j
  • zlib/1.2.8
  • libidn/1.29
  • libssh2/1.4.3

Windows

  • libcurl/7.40.0
  • OpenSSL/1.0.1j
  • zlib/1.2.8
  • libidn/1.29
  • libssh2/1.4.3
Protocol Mac OS X Windows
dict
file
ftp
ftps
gopher
http
https
imap
imaps
ldap
ldaps
pop3
pop3s
rtsp
scp
sftp
smtp
smtps
telnet
tftp
Feature Mac OS X Windows
IDN
IPv6
Largefile
NTLM
SSL
libz

Remarks

On Mac, SSH2 is linked to the system OpenSSL located at /usr/lib/, not the one embedded in the plugin. This is to avoid crash with SFTP.

On Windows, OPENSSL (LIBEAY and LIBSSL) and LIBSSH2 are statically linked to LIBCURL, to avoid collision with the DLL included in 4D itself.

LIBCURL is modified so that it will yield to 4D during a long operation (easy.c).

4d-plugin-curl's People

Contributors

miyako avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.