Request Parameters

37 просмотров
Перейти к первому непрочитанному сообщению

Maatary Okouya

не прочитано,
12 февр. 2015 г., 17:30:2812.02.2015
– spray...@googlegroups.com
Hi, 

quick stupid question. Are request parameters to be part of the provided uri, or there are construct for it?  (Client side)


This leads also to the following question: On the server side, is there anything to help in reading parameters and deconstructing them ?


Sample URI with parameter

Maatary Okouya

не прочитано,
16 февр. 2015 г., 15:37:5716.02.2015
– spray...@googlegroups.com
I found in spray routing the handling of parameters. 

My client code works fine if i use an URL with my parameter into it. I'm just wondering is there is a facility similar to the server side, to deal with parameter but from the construction perspective. I mean if it exist i would rather use it. 

Best,

D

Mathias Doenitz

не прочитано,
17 февр. 2015 г., 07:18:3117.02.2015
– spray...@googlegroups.com
Maatary,

maybe you are looking for this?:
http://spray.io/documentation/1.2.2/spray-routing/parameter-directives/

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/0c9e02cd-2daa-47c3-9e37-628f288b2999%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Maatary Okouya

не прочитано,
17 февр. 2015 г., 10:58:4917.02.2015
– spray...@googlegroups.com
Thanks Mathias,

I found it before. I was wondering if there was some facility on the client side. This is for deconstructing, I was wondering if they were facility for constructing the URL with the parameter. Like what you have for header, multi-part, authentification and etc....

Mathias Doenitz

не прочитано,
17 февр. 2015 г., 11:22:2017.02.2015
– spray...@googlegroups.com
Maatary,

on the client side simply use the existing constructors for a `URI`, which allow you to specify each component individually.
Or simply use a modifier, like this

Uri(“http://example.com/path/”).withQuery(Query(“foo” -> “bar”, “baz” -> “42”))

There are many options.
Simply browse through the API.

Cheers,
Mathias

---
mat...@spray.io
http://spray.io

> To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/05d4480a-262c-4beb-94df-aa060dcfe7e2%40googlegroups.com.

Maatary Okouya

не прочитано,
17 февр. 2015 г., 15:47:2117.02.2015
– spray...@googlegroups.com
Many thanks Mathias.
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений