rubyhttphttpi

How to assign port for HTTPI?


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?


Solution

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

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