Abhishek Mukhopadhyay Abhishek Mukhopadhyay -4 years ago 129
Scala Question

Access URL Query Parameters in Lagom

How can I access URL query parameters from the http request in Lagom? I have a requirement where the set of query parameters are indefinite and infinite. I want to access the query parameter as a map. Is there any way to do that?

Answer Source

There isn't currently a way to access the query parameters as a map, or to declare a service call that takes indefinite parameters, as of Lagom 1.3.

In situations where the request may be of arbitrary length or complexity, it is better to encode request data in the entity body and use a request message deserializer in Lagom to map that to an immutable data type.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download