http4s-curl icon indicating copy to clipboard operation
http4s-curl copied to clipboard

unexpected HTTP status: 100 Continue for request GET https://example.com

Open armanbilge opened this issue 2 years ago • 0 comments

//> using lib "org.http4s::http4s-curl::0.2.0"

import cats.effect.IO
import org.http4s.curl._

object App extends CurlApp.Simple {
  def run = curlClient.expect[String]("https://example.com").flatMap(IO.println)
}

Yields:

org.http4s.client.UnexpectedStatus: unexpected HTTP status: 100 Continue for request GET https://example.com

I guess we need special handling for 100 responses? 🤔

Or maybe we can make curl not send this. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100

To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request and receive a 100 Continue status code in response before sending the body.

armanbilge avatar Feb 08 '23 03:02 armanbilge