Questions tagged [scala-dispatch]

Dispatch is a library for asynchronous HTTP interaction. It provides a Scala vocabulary for Java’s async-http-client.

Dispatch is a library for asynchronous HTTP interaction. It provides a Scala vocabulary for Java’s async-http-client.

http://dispatch.databinder.net/Dispatch.html

91 questions
0
votes
1 answer

How to stream the response of dispatcher?

I have to export the CSV data. The volume of data is very high. So I am streaming the response from the microservice. We hit our microservice using dispatcher. def stream(method: String, urlString: String): Future[Source[ByteString, NotUsed]] = …
Mahesh Chand
  • 3,158
  • 19
  • 37
0
votes
1 answer

Error in scala + dispatch

I am trying to GET a response from an API, using scala and dispatch. However, I get this error, after building. I googled for a solution, and tried cleaning, and resarting eclipse, but the error wont go away. What seems to be the problem? I use…
theTuxRacer
  • 13,709
  • 7
  • 42
  • 59
0
votes
1 answer

use libraries in Scala

I'm a bit of a noob to Scala at the moment and I'm messing about making little toy projects. One of the things I want to do is a bit of web page scraping, a quick google search suggested using the dispatch package available from here…
djhworld
  • 6,726
  • 4
  • 30
  • 44
0
votes
1 answer

JSON Data Conversion for Rest Calls in Scala

I have worked on Rest development with Spring. Spring library takes care of JSON data conversion in a request body as well as in a response. I am wondering any good approach for Dispatch, a Scala Rest library, that is to convert a case class to a…
TeeKai
  • 671
  • 2
  • 10
  • 20
0
votes
1 answer

How timeout works in Dispatch

At API there is: val http = Http.configure(_ .setConnectionTimeoutInMs(1) ) What for is this config? I use it with: .setMaxRequestRetry(0) I fought I will get failed future after timeout. Future I create like that: val f = http(u OK…
Waldemar Wosiński
  • 1,490
  • 17
  • 28
0
votes
1 answer

Unknown Error from SBT console for dispatch-Http Get request

I m doing simple Http GET request by using dispatch library in SBT. My Code: def getReq(){ val svc = url(GlobalObjects.BASE_GET_REQUEST_URL); val response : Future[String] = Http(svc OK as.String) response onComplete { case…
DSKVP
  • 663
  • 2
  • 11
  • 19
0
votes
1 answer

Error dispatch-nio is not found

I m trying out the example given at http://dispatch-classic.databinder.net/Choose+an+Executor.html for dispatch-nio: Example given: import dispatch._ val h = new nio.Http val f = h(url("http://www.scala-lang.org/") as_str) My code: import…
DSKVP
  • 663
  • 2
  • 11
  • 19
0
votes
1 answer

Is there a way to limit the HTTP response body size received by Dispatch?

I'm using Dispatch to pull down a lot of pages from which I only need the first few K, and the pages are sometimes gigabytes. Is there any way in scala-dispatch (dispatch/reboot), or maybe in the HTTP request, to truncate the body…
Ed Staub
  • 15,480
  • 3
  • 61
  • 91
0
votes
1 answer

Play Framework with dispatch(scala) : where should I install dispatch?

I am trying to parsing JSON with scala. So I make a scala Play Framework project. I heard if I want to use HttpUrlConnection like java, I need to import dispath classes. I got that, but problem is I can guess where to install(?) this. I visited…
Juneyoung Oh
  • 7,318
  • 16
  • 73
  • 121
0
votes
1 answer

Where to put dispatch.Http.shutdown() in case of cascading Http calls

At Where to put dispatch.Http.shutdown() I asked where to place the call to dispatch.Http.shutdown() if there are n independent Http calls. Those n independent calls, however, are all on the same "level". How about cascading Http calls, whereas…
nemron
  • 701
  • 6
  • 23
0
votes
1 answer

Developing SBT plugin with Dispatch 0.11.0 results in Scala compiler's mysterious errors

I'm new to Scala and Dispatch, and I can't seem to get a basic Post request working. I'm actually building a sbt plugin that uploads files to a third party service. Here is my build.sbt file: sbtPlugin := true name :=…
matt walters
  • 591
  • 6
  • 14
0
votes
2 answers

Getting headers from dispatch library (version 0.10.1)

This is technically a duplicate to this thread: Return exact response/header? However, the code in there doesn't seem to work for me. I see in the changelogs for dispatch that handing has changed subtley, but for the life of me I cannot get this to…
David McHealy
  • 2,471
  • 18
  • 34
0
votes
0 answers

Decompress async-http-client gzipped HttpResponseBodyPart in Scala?

Because Scala Dispatch 0.9.5 doesn't seem to have a default handler for decompressing GZIP streams, I'm attempting to modify it's as.stream.Lines handler for incoming data. Since the same project is also using Spray.io, I attempted to use it's…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
0
votes
1 answer

Simple use of dispatch

I'm about to set up a stupid play/scala app whose only job will be to make some http call once it receives calls itself GET /abracadabra controllers.Application.abracadabra(stuff: String) and then def abracadabra(stuff: String) = Action { …
mfirry
  • 3,634
  • 1
  • 26
  • 36
0
votes
1 answer

I am using dispatch for scala, how can I convert the response of the web service into sa JSON file?

I am making a http request to a web service using the dispatch library and scala. Everything is working fine, what I wanted to do is to convert the response into a JSON. I can already get the response but it's in a String format. Here's what I'm…
jeypijeypi
  • 373
  • 1
  • 4
  • 12