How to assign port for HTTPI?

349 Views Asked by At

I'm using httpi library.

Usually in http libraries we can set a port for http connection, but in httpi I can't.

How to assign port for HTTPI connection?

1

There are 1 best solutions below

1
RichieHindle On BEST ANSWER

Normally you'd include the port number in the URL, like this:

request = HTTPI::Request.new("http://example.com:1234/")