NSxfer (NSIS plugin)
NSxfer gives you the means to perform complex HTTP/HTTPS transfers from a NSIS script
- Multi threaded: transfer multiple files in parallel
- Asynchronous: start a download now, check its status later
- Aggressive: multiple attempts to connect, reconnect, resume interrupted transfers, etc.
- NSIS aware: download files at any installation stage (from
.onInit
callback, fromSections
, from custom pages, silent installers, etc.) - Informative: plenty of useful information is available for each transfer (size, speed, HTTP status, HTTP headers, etc)
- Supports all relevant HTTP verbs (GET, POST, PUT, HEAD, etc)
- 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
- Many more... Check out the included readme file
- HTTP GET example:
NSxfer::Transfer /URL "https://httpbin.org/get?param1=1¶m2=2" /LOCAL "$TEMP\Response.json" /END
Pop $0 ; "OK" for success
- HTTP POST
application/json
:
NSxfer::Transfer /URL "https://httpbin.org/post?param1=1¶m2=2" /LOCAL "$TEMP\MyFile.json" /METHOD POST /DATA '{"number_of_the_beast" : 666}' /HEADERS "Content-Type: application/json" /END
Pop $0 ; "OK" for success
- HTTP POST
application/x-www-form-urlencoded
:
NSxfer::Transfer /URL "https://httpbin.org/post?param1=1¶m2=2" /LOCAL "$TEMP\MyFile.json" /METHOD POST /DATA 'User=My+User&Pass=My+Pass' /HEADERS "Content-Type: application/x-www-form-urlencoded" /END
Pop $0 ; "OK" for success
- More complex examples in the readme file