Making a "GET" call using dispatch.gae.Http

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Making a "GET" call using dispatch.gae.Http

Rustem Suniev
I want to make a simple call:

def http = new dispatch.gae.Http
val verifyURL = "localhost:8080/verify/ticket"
val req = :/(verifyURL)
http(req >>> System.out)

However it doesn't work.

I checked the example:

def http = new dispatch.gae.Http
val (rs, _) = http(client.handle(
  OpenEvents.topic(topics.get.split(",").map { _.trim }: _*).geo(lat.get, lon.get)
))

but it has some logic in the Meetup client

Is there any way to make a just GET call as previously described?

Regards,
Rustem




Reply | Threaded
Open this post in threaded view
|

Re: Making a "GET" call using dispatch.gae.Http

n8han
Administrator
On 03/16/2011 08:56 AM, Rustem Suniev [via Databinder] wrote:
I want to make a simple call:

def http = new dispatch.gae.Http
val verifyURL = "localhost:8080/verify/ticket"
val req = :/(verifyURL)
http(req >>> System.out)

Try...

http(:/("localhost", 8080) / "verify" / "ticket" >>> System.out)

Seems like this is a common misunderstanding!

http://databinder.3617998.n2.nabble.com/Creating-a-new-HTTP-host-td6097819.html

Nathan


However it doesn't work.

I checked the example:

def http = new dispatch.gae.Http
val (rs, _) = http(client.handle(
  OpenEvents.topic(topics.get.split(",").map { _.trim }: _*).geo(lat.get, lon.get)
))

but it has some logic in the Meetup client

Is there any way to make a just GET call as previously described?

Regards,
Rustem







If you reply to this email, your message will be added to the discussion below:
http://databinder.3617998.n2.nabble.com/Making-a-GET-call-using-dispatch-gae-Http-tp6176395p6176395.html
To start a new topic under Databinder, email [hidden email]
To unsubscribe from Databinder, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Making a "GET" call using dispatch.gae.Http

Rustem Suniev
Ah I see now  "...Dispatch doesn't have an explicit way use URL strings..."

Thanks.
Rustem