Timeout

26 views
Skip to first unread message

Maatary Okouya

unread,
Feb 12, 2015, 8:13:24 PM2/12/15
to spray...@googlegroups.com
Hi, 

the service that that i'm request naturally take time to answer. 


How can i add a Timeout infinite ? or at least change it ?


object FileUploadApp  extends App {

implicit val system = ActorSystem("simple-spray-client")
import spray.examples.FileUploadApp.system.dispatcher // execution context for futures below

val file = new File((getClass.getResource("/Health-Benefit-Plans.pdf")).toURI)

val pipeline = addCredentials(BasicHttpCredentials("*****", "****")) ~> sendReceive

val payload = MultipartFormData(Seq(BodyPart(file, "file", MediaTypes.`application/pdf`)))

val request = Post("http://workingontologist.poolparty.biz/extractor/api/categorization?projectId=1DBCC836-91A1-0001-A2AB-19603D0019C6&language=en", payload)

//println(request)

pipeline(request).onComplete { res =>
println(res)
system.shutdown()
}


Mathias Doenitz

unread,
Feb 17, 2015, 7:31:30 AM2/17/15
to spray...@googlegroups.com
https://github.com/spray/spray/blob/master/spray-can/src/main/resources/reference.conf#L42

Cheers,
Mathias

---
mat...@spray.io
http://spray.io
> --
> You received this message because you are subscribed to the Google Groups "spray.io User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spray-user.
> To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/ad6a929e-64a7-4542-8ad0-70029b08319b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages