Golang http request results in EOF errors when making multiple requests successively

前端 未结 3 1203
有刺的猬
有刺的猬 2020-12-07 19:11

I am trying to debug a very unusual error I am receiving for a simple REST library I wrote.

I am using the standard net/http package to make Get, Post, Put, Delete r

3条回答
  •  离开以前
    2020-12-07 20:05

    I'm going to guess there is no problem with your code. The most likely cause of your problem is because the server is closing the connection. Rate limiting is one possible reason for this.

    Your test shouldn't be relying on an external service that's very brittle and not hermetic. Instead you should think about spinning up a test server locally.

提交回复
热议问题