如何通过Postman或Insomnia向服务器发送长时间HTTP请求?

时间:2019-12-25 08:43:34

标签: rest curl request postman insomnia

我有一个服务器作业应至少运行5分钟,并且我配置了RESTful API将请求发送到该服务器。我有一个名为/run的端点,并且我的服务器在端口3333上运行。

因此,当我使用一个使用过的客户端之一向http://localhost:3333/run发送GET请求时,

  • 邮递员等待大约2分钟
  • 失眠症等待大约2.5分钟
  • 卷发等待大约2分钟

  • 邮递员记录Could not get any response,并在控制台中记录socket hang up
  • 失眠日志Error: Server returned nothing (no headers, no data),这些日志写在时间轴选项卡上:
* Preparing request to http://localhost:3333/run
* Using libcurl/7.67.0 OpenSSL/1.1.1d zlib/1.2.11 nghttp2/1.29.0
* Current time is 2019-12-25T07:36:11.698Z
* Disable timeout
* Enable automatic URL encoding
* Enable SSL validation
* Enable cookie sending with jar of 0 cookies
* Too old connection (252 seconds), disconnect it
* Connection 0 seems to be dead!
* Closing connection 0
*   Trying 127.0.0.1:3333...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 3333 (#1)

> GET /run HTTP/1.1
> Host: localhost:3333
> User-Agent: insomnia/7.0.6
> Accept: */*

* Empty reply from server
* Connection #1 to host localhost left intact
  • 卷曲日志curl: (52) Empty reply from server

我确信我的算法在服务器上运行,并且返回了响应,因为我已经记录了所有这些部分,在中间进程之间放置了另一台服务器并获得了响应,但是在Postman,失眠或curl上看不到它。

0 个答案:

没有答案