You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Puppy you can make HTTP requests without needing to pass the -d:ssl flag or shipping extra *.dlls and cacerts.pem on Windows. Puppy avoids these gotchas by using system APIs instead of Nim's HTTP stack.
Some other highlights of Puppy are:
Supports gzip'ed responses out of the box
Make an HTTP request using a one-line proc call
OS
Method
Win32
WinHttp WinHttpRequest
macOS
AppKit NSMutableURLRequest
Linux
libcurl easy_perform
Curently does not support async
Easy mode
echo fetch("https://neverssl.com/")
A call to fetch will raise PuppyError if the response status code is not 200.
More request types
Make a basic GET request:
import puppy
let response = get("https://www.google.com/")
You can pass -d:puppyLibcurl to force use of libcurl even on Windows and macOS. This is useful if for some reason the native OS API is not working.
Libcurl is typically ready-to-use on macOS and Linux. On Windows you'll need to grab the latest libcurl DLL from https://curl.se/windows/, rename it to libcurl.dll, and put it in the same directory as your executable.