Noam
Noam

Reputation: 3391

Restler doesn't auto route required parameters in URL

I'm using Restler 3, and am trying a very basic URL routing:

GET /method/{param}

My api class method gets param as the first required parameter, but he only gets it if I pass it through the request (GET /method?param=value)

It seems from the routing docs (link: http://restler3.luracast.com/examples/_006_routing/readme.html), this should be the default behavior. I've tried also playing with Defaults::$smartAutoRouting = false; which didn't seem to work.

Starting from Restler 3, smart auto routes are created where optional parameters will be mapped to query string, required primitive types will be mapped to url path, objects ana array will be mapped to request body.

Upvotes: 0

Views: 432

Answers (1)

Arul Kumaran
Arul Kumaran

Reputation: 993

We have just fixed this bug in RC5. Download the update and try again!

Upvotes: 1

Related Questions