Skip to content
⌘ NSIS Forum Archive

HTTP GET/POST to a URL

4 posts

Raven83#

HTTP GET/POST to a URL

Hello,

I need to call a URL and pass some parameters, the URL that i'm calling will send back a file based on the parameters, how do i handle this in NSIS? i tried using Inetc::GET and Inetc:😛ost but not sure how to handle the file that is sent back..any input would be great, thanks..
Raven83#
Originally Posted by Anders View Post
Maybe you could post the code you already have and maybe we fill in the blanks...
Hey, this is the code,

inetc::post "http://somedomain.com/redirect.php?majorverion=2&minorversion=5
"$PROGRAMFILES\${PRODUCT_NAME}\productsetup.exe" 
i was hoping the file sent back could be saved to the file "PROGRAMFILES\${PRODUCT_NAME}\productsetup.exe" but it doesnt, anything we can do? thanks a lot..
Anders#
Does it have to be a HTTP POST? Normally you would use GET.

inetc::get "http://images.sourceforge.net/images/project-support.jpg" "$ProgramFiles\Foo\Bar\image.jpg" /END
Pop $0 ; $0 will be "OK" if string