I'm trying to send a get request to my localhost using Akka HTTP and I get the following exception:
EntityStreamSizeException: actual entity size (Some(10166731700)) exceeded content length limit (8388608 bytes)! You can configure this by setting akka.http.[server|client].parsing.max-content-length or calling HttpEntity.withSizeLimit before materializing the dataBytes stream.)
Basically, the file on my localhost which I'm trying to request is very large.
I tried to solve it by using withoutSizeLimit
, but it's not working:
val request = Get("http://localhost:8080/oa-ok.ntriples")
val limitedRequest = request.withEntity(request.entity.withoutSizeLimit())
val responseFuture = Http().singleRequest(limitedRequest)
I also tried to use withSizeLimit
and it didn't help. Any ideas?