Install cURL on Windows
It is not possible to test APIs that return “text/event-stream” response like SSE. We can test these APIs with cURL. Installation steps on Windows are described as below:
- Download https://curl.se/windows/dl-7.74.0/curl-7.74.0-win64-mingw.zip and unzip.
- Create a folder named “curl” under Documents.
- Copy “curl.exe” file from the extracted folder to “curl” folder you just created.
- Download a certificate from https://curl.haxx.se/ca/cacert.pem
- Download and copy the certificate to your “curl” folder.
- Run “cmd” and navigate to “Documents/curl”.
- You can run call your API from cmd like this:
C:\Users\senoritadev\Documents\curl> curl.exe — insecure -L -X GET https://sse.senoritadev.net/email-operations -H “Authorization: Bearer fa78cd8d9cab352d421d3cbc64346264ef9afcd35c560e506bd39ee9c44970a6” -H “X-IP: 127.34.34.5” -H “X-Port: 123” -H “App-Version: 1.2.2” -H “Device-Language: en-EN” -H “Device-Name: Test” -H “Device-ID: 123123” -H “Device-OS: MacOS”
Happy Coding!