/nsis-nscurl

NSIS plugin with advanced HTTP/S capabilities

Primary LanguageCBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

NScurl (NSIS plugin)

NScurl is a NSIS (Nullsoft Scriptable Install System) plugin with advanced HTTP/HTTPS capabilities.
It's implemented on top of libcurl with OpenSSL as SSL backend.
This plugin is included in my unofficial NSIS builds.

License: BSD3 Latest Release Downloads GitHub issues

Features:

  • Modern: supports modern SSL protocols and cyphers including HTTPS/2, TLS1.3, etc.
  • Compatible: works well on Windows NT4, Windows 10 and everything in between
  • Multi-threaded: download/upload multiple files in parallel
  • Asynchronous: start multiple background transfers, check on them later
  • Insistent: multiple attempts to connect and resume interrupted transfers
  • NSIS aware: download files at any installation stage (from .onInit, from Sections, from custom pages, silent installers, etc)
  • Verbose: plenty of useful information is available for querying (transfer size, speed, HTTP status, HTTP headers, etc)
  • Supports HTTP and TLS authentication
  • Supports all relevant HTTP methods (GET, POST, HEAD, etc)
  • Supports DNS-over-HTTPS name resolution
  • Supports custom HTTP headers and data
  • Supports proxy servers (both authenticated and open)
  • Supports files larger than 4GB
  • Can download remote content to RAM instead of a file
  • Works well in 64-bit NSIS builds
  • A lot more... Check out the included documentation

Basic usage:

NScurl::http GET "http://live.sysinternals.com/Files/SysinternalsSuite.zip" "$TEMP\SysinternalsSuite.zip" /CANCEL /RESUME /END
Pop $0 ; Status text ("OK" for success)
  • Quick transfer (custom GET parameters + custom request headers):
NScurl::http GET "https://httpbin.org/get?param1=value1&param2=value2" "$TEMP\httpbin_get.json" /HEADER "Header1: Value1" /HEADER "Header2: Value2" /END
Pop $0
  • POST a .json file
NScurl::http POST "https://httpbin.org/post" MEMORY /HEADER "Content-Type: application/json" /DATA '{ "number_of_the_beast" : 666 }' /END
Pop $0
  • POST a .json file (as MIME multi-part form)
NScurl::http POST "https://httpbin.org/post" Memory /POST "User" "My user name" /POST "Password" "My password" /POST FILENAME=maiden.json TYPE=application/json "Details" '{ "number_of_the_beast" : 666 }' /END
Pop $0

Licenses:

Project License
This project itself BSD3
libcurl MIT/X inspired
OpenSSL Dual License
nghttp2 MIT
zlib zlib