How to use Postman to send request to another PC's server? - postman

I have an Rest Api created on my destination PC. I can make post request to localhost using postman from same PC. but I want to send a post request to the localhost of another machine. What steps do i have to take to achieve this?

To do so, you need to have both pc on the same local network if you want to test locally.
Use the other PC's(where REST API is deployed) IP or hostname to hit the REST API request.

Related

How can I use NiFi to Invoke a HTTP and send a RESTful web Service to another machines with IP address?

Current setup, there are 2 computer machine
First machine (IP of 192.168.4.1)
It contain the NiFi setup as show in the image below:
NiFi setup
Inside the NiFi setup, I get a file from a local directory and I invoke a HTTP POST to send over to the second machine which hit the Wildfly Restful Webservice endpoint. Below image show the configuration I have done inside the Invoke HTTP:
Invoke HTTP configuration
(Note: the Remote URL: http://192.168.3.1:8081/JaxRS-Nifi/restapi/multipart/upload)
Second machine (IP of 192.168.3.1)
It contain a Wildfly Restful Webservice which allow my first machine to hit the webservice endpoint.
Error that I am facing:
NiFi Error
I have a problem which the first machines doesn't send a HTTP POST over to the Second machines. I am currently looking for solutions on what are the different configurations should I do to make a NiFi HTTP over to hit the Restful Webservice endpoint?
Thanks. Appreciate if there is anyone who can help me.

Unable to link dialogflow webhook to ngrok tunnel

Have created a chatbot and I am trying to connect it to my local host using ngrok....the localjost is running via my computer and is showing active...however dialogflow webhook is not able to send any request to the ngrok portal...
I have tried multiple time to host a server via ngrok and pasted the link in webhook section in Dialogflow..but dialogflow diagnostic shows
Webhook call failed. Error: PERMISSION_DENIED.
fulfillment status ngrok cmd prompt ngrok server
Any help would be appreciated...not sure what I am missing....
Without seeing the actual configuration, there are a few things I would look at:
Make sure you're actually using the right ngrok URL from your console. Many times I was using an older URL in the Dialogflow configuration.
Make sure you're using the HTTPS URL.
Make sure your server is actually running on your computer, and that it is listening at the same port that ngrok is using on your computer.
Check the ngrok console to see if it is getting the request at all and what the response might be.
Go to http://localhost:4040/ which will give you details of each connection through ngrok.

Is it possible to capture requests with Postman standalone app?

I was wondering - is it possible to capture requests with Postman standalone app, when requests are issued NOT by a browser, but a Console App or a Windows service? My app is making AJAX calls to a server, I want these calls to be captured with Postman app.
Can you set a proxy for your Console App/Windows service? If yes, then it might be possible.
You need to get the port number from Postman's proxy setting and the IP address from your computer. Apply these two as the proxy for your app, and Postman should hopefully be able to listen in to your requests.
Here's the blogpost from where I found this out.

Check game server ping in a browser?

I've been researching around regarding the capabilities of having a client access a website and check their ping in a game (so far there seems to be no possible way using JS, however there may be a way with AJAX?). Without a website, the method to check ping would be using the command-line ping command to the server address through ICMP. Would it be possible to check the ping of a client to the game server with a website middle-man?
EDIT: If I do a php solution as described here: Pinging a server in php without the port?
could I do something like checking the ping of client to my website, then checking from my website to the game server and then predict the ping of the client?
You cannot really use ping command from js, but you can use AJAX call to some empty file on your server, to measure the response time:
var start = new Date().getTime();
$.ajax('http://your_server/empty_file')
.always(function( data ) {
console.log(new Date().getTime()-start);
});
EDIT: you can only 'ping' game server using this method if it has HTTP server running on it (you may need to set up headers to enable cross-domain requests for that). If both servers are on the same fast local network, there is no need to ping to both servers separately, the measurments are going to be the same.

Apex callout to local web service or to web service in test environment?

I'm pretty new to salesforce callout stuff and trying to make a simple GET request from my salesforce callout, but I kept getting this error:
System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found
I'm pretty sure this is because I'm making request to the web service on my local machine, but since I'm only testing this out, I don't have a server that's available online.
I tried making a callout to just http://www.google.com?q=blah and it works just fine.
So I guess my question is that anyone has a way to make callout to a web service on their local machine?
Just put your ip address instead of 'localhost' and that is it. If you have a router at work/home, you need setup it so it route internet calls to your PC.
That is how it works for me right now. I created a WS using Java. Started a server on 8080 port. From my SFDC application I call xx.xx.xx.xx:8080/bla