I have an application that I'd like to consume an API for a SMS sending service that takes the following variables : username, from, message & to. It has a header of the apikey and it's value. I used WinSock that was working but the service provider has since advised that the request needs to be a https request. I'm new to web development and VB6 application was written way back.
This is my post request
POST /version1/messaging HTTP/1.0
Host: api.africastalking.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141
ApiKey: 37236e3e47654ee7773bbbc78a4049fde7d3390dbb70f630b19f4aeab7b0ce88
username=xxxxxxx&message=Hello%20Kind%20regards%2C%20xxx%20xxxx%20xxx%2E%20Tel%2E%200721000111&to=%2B254721000111&from=xxxx
It works in postman. I can provide the variables via email.
This is the response
HTTP/1.1 308 Permanent Redirect
Date: Tue, 06 Jun 2023 18:40:40 GMT
Content-Type: text/html
Content-Length: 164
Connection: close
Location: https://api.africastalking.com/version1/messaging
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>`your text`
</body>
</html>