get and post request to a https site using vb6.0 - vb6

Hi i am using MSXML2.ServerXMLHTTP40 to get and post request to a url.When i post to http site it works fine but when i post to https site it throws me an error stating the operation timed out.I am not able to get the response.Kindly help me out.Thanks in advance

I Found the solution I have to set the ..setproxy and setproxycredentials along and also i need to get the session id .When i used all the three it worked fine.

By default HTTP will use port 80 but HTTPS uses port 443. Is it possible that you've got a firewall blocking port 443?
I'd suggest trying to connect to both sites from a webbrowser to make sure it all works.

Related

What is the request that whatsapp cloud api does to verify a webhook?

I'm able to verify the webhook using glitch from the getting started:
https://glitch.com/edit/?fbclid=IwAR2YTjZuGGM9Hi6T_v1eZh_nV6_HY3RYn_8lll4gY1REa_bJy6ZAuq6tkKQ#!/whatsapp-cloud-api-echo-bot
my local server (in a subdomain with https enabled) has the same behavior as glitch and show "WEBHOOK_VERIFIED" on the log for the request:
/webhook?hub.mode=subscribe&hub.verify_token=xpto123&hub.challenge=123
but when try to verify my local server the request from meta does not reach the server.
chrome showing that the connection to the server is secured
After more tests I found that my local server was been blocked by the ISP, understood it after test with another connection.
I made my own server and had tried ngrok and other programs to run it from local host with https redirect but whatsapp doesn't allow the use of those programs.
In the end, my error was that the URL HAS to end in /webhook or else, it won't even send the request. Then it'll send a GET request and you have to return the hub.challenge query param after making sure that the provided token from them is the one you set up. This is my code using NodeJS
if(req.query['hub.verify_token'] === process.env.VERIFY_TOKEN) return res.status(200).send(req.query['hub.challenge'])

Error: Econnrefured when connect to localhost

Hi I'm new to postman and I have this problem connecting to local host.
I made a POST request to localhost:3000 and it keeps showing error: connect econnrefuse 127.0.0.1:3000.
I have tried to check and uncheck the Use the system proxy and also add a custom proxy.
It still doesn't work.
Could someone please help me? Thanks
this is the error
2
postman proxy

Hosting using HTTPS and subdomain

I am a beginner in website hosting please consider if my question is too silly or this is not the right place to ask this question and direct me to the right place.
I have website (hosted on a subdomain) already running on HTTP (perfectly). I am moving to HTTPS using Let's Encrypt. I have generated the certificate, configured my application and then deployed it using AWS lightsail. I have pointed the domain name using A record, where my lightsail instance IP is pointed by my subdomain.
Problem: When ever I go to my website using the URL https://subdomain.mywebsite.com:80 it works perfectly fine with no privacy error. My HTTPS server listens on port 80. But, if I try any other URL like subdomain.mywebsite.com:80 or subdomain.mywebsite.com I get a privacy error in google chrome saying "Your connection is not private".
I think I am missing some fundamental, which I not able to understand on my own.
My application is nodejs based below is a snippet of my server
const options = {
cert: fs.readFileSync('./sslcert/fullchain.pem'),
key: fs.readFileSync('./sslcert/privkey.pem')
};
app.listen(function () {
console.log("Live");
});
https.createServer(options, app).listen(80, function() {
console.log("From HTTPS");
});
What you need is to redirect all requests to port 80 to port 443, that way browsers apply automatically https protocol.
This means that if someone uses "subdomain.mywebsite.com", it is by default http and port 80, i.e, "http://subdomain.mywebsite.com:80" and you want it to be redirected to "https://subdomain.mywebsite.com", that is listening by default on port 443.And you configure your https service on port 443, which is the standard port for https.
You have two approaches:
Do the redirection in node.js: have a look to this answer for guidance: Automatic HTTPS connection/redirect with node.js/express
Use a proxy to do the redirection:have a look to this blog post for guidance (I am not related to that blog, just did a quick google search): https://serversforhackers.com/c/redirect-http-to-https-nginx
I hope this helps. Provide some comment if you need more clarifications.

getting error response in jmeter while testing google site

while during load testing for one site through j meter getting below
error:Response code: Non HTTP response code:
org.apache.http.conn.ConnectTimeoutException Response message: Non
HTTP response message: Connect to 172.17.4.213:80 timed out
You most probably didn't configure the proxy for JMeter as per:
http://jmeter.apache.org/usermanual/get-started.html#proxy_server
Look at your browser (where request works) proxy configuration for the settings.
I think you should check your URL/ip address is pointing to your code properly by some online ping tool. And If it is working, check if your network is not blocking site access.

How to set a timeout for Luasoap using https

Im developing an sdk to connect to a soap server. (Under https)
Im using LuaSoap to do it and its working as espected with the xml request but now i need to be able to configure the timeout (im in online payments industry and its really important) but I dont know how to do it in LuaSoap.
To be able to enable the https requests i followed the instructions of LuaSoap documentation using this code
local soap = require"soap.client"
soap.https = require"ssl.https"
from this point i dont know what to do or where to set the timeout.
Tnx for ur help.
PD.
LuaSoap uses LuaSec to send the request.

Resources