cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Anders_HO
Level I

Http Request with IP address and port

hi,

 

I tried to use the script below to access Mysql data but failed.

Names Default To Here( 1 );
request =
New HTTP Request(
	url( "117.186.159.54:2010" ),
	Method( "Get" ),
	Username( "ross" ),
	Password( "Abc123" ),

);
data = request << Send;

The url/username/password are all dummy just for demonstration.

But it always says that connection refused. I can make sure that the ip+port is available.

 

Could I use ip+port as url? Is the syntax valid? Since the client provide me with this kind of IP address/port/username/passcode.

4 REPLIES 4
Craige_Hales
Super User

Re: Http Request with IP address and port

Does the address:port work from a browser? I think what you are trying is reasonable.
Craige
Anders_HO
Level I

Re: Http Request with IP address and port

no, it won't work on browser. It refuses connection.

Craige_Hales
Super User

Re: Http Request with IP address and port

If the software at port 2010 isn't a http web server of some sort, I don't think JMP's http request is the right answer.

If you are trying to connect to the mysql server port (typically 3306) you'll want to use a mysql driver.

SQL for Cord-Cuttershas an example if you are trying to connect to a mysql database.

Craige

Re: Http Request with IP address and port

You can use the ip and port, if you put http or https in front of it.

with out the protocol, it assumes http, where it looks like it's being refused.