Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用httpi库。
通常在 http 库中我们可以为 http 连接设置一个端口,但在 httpi 中我不能。
如何为 HTTPI 连接分配端口?
通常你会在 URL 中包含端口号,如下所示:
request = HTTPI::Request.new("http://example.com:1234/")