Hi, Thanks for your reply.
The error I received is "The server returned a 404 response." Your suggestion is ok that I can use 1_2 in version. But I have some other parameters like keyword for searching. In this parameter there may be chance for '.' (dot). Can you suggest me a way to overcome this? regards Shihab On Sep 5, 9:02 pm, Davide Borsatto <lloy...@gmail.com> wrote: > What error are you receiving? > Anyway, pay attention to the fact that without "." as segment > separator, your URL definition is not correct since you still use / > categories.:sf_format (the dot is before :sf_format). > > My suggestion would be anyway not to use "." in the API version > number. This way "1.2" would become "1_2" or "12" or "1,2". Simply use > another separator (or no separator at all)... > > On Sep 5, 8:04 am, Shihab KB <shiha...@gmail.com> wrote: > > > > > Hi, > > > I am writing a REST API using symfony version 1.4. In the version > > parameter the values may be 1.1, 1.0 etc. Since '.' character is a > > default segment seperator character, I given segment_separators: > > ['/']. But when the value of version have a '.' character it is giving > > me an error. Can you sugest a way to doing this? > > > //routing.yml > > api_news_categories: > > url: /news/:ver/:lang/:usertoken/categories.:sf_format > > class: sfDoctrineRoute > > param: { module: news, action: newscategories, sf_format: json, > > start: 1, count: 10 } > > options: { segment_separators: ['/'], model: Newsitem, type: list, > > method: getNewsCategories } > > requirements: > > sf_format: (?:xml|json) > > sf_method: get > > > //factories.yml > > all: > > routing: > > class: sfPatternRouting > > param: > > generate_shortest_url: true > > extra_parameters_as_query_string: true- Hide quoted text - > > - Show quoted text - -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en