dom96 / httpbeast

A highly performant, multi-threaded HTTP 1.1 server written in Nim.
MIT License
450 stars 53 forks source link

add a send overload #55

Closed ringabout closed 3 years ago

ringabout commented 3 years ago

ref https://github.com/dom96/jester/issues/241

adding a way supporting user-defined Content-Length

usage:

  if headers.hasKey("Content-Length"):
    request.send(code, body, some(headers["Content-Length", 0]), headers.createHeaders)
  else:
    request.send(code, body, headers.createHeaders)
dom96 commented 3 years ago

At this point, can't the framework just use unsafeSend?

ringabout commented 3 years ago

I see.