D
D
Danil2016-05-30 13:17:24
Node.js
Danil, 2016-05-30 13:17:24

How to separate parameters in query string?

There is a url

http://127.0.0.1/search/query?type=cloth&date=10.10.2015&page=1

I need to have one more parameter at the end, but through /, that is, it should be like this:
http://127.0.0.1/search/query?type=cloth&date=10.10.2015&page=1/parameter

But on the server, it /search/:queryshows that query is everything after query?the URL and does not perceive the parameter after the slash as a separate one. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2016-05-30
@Veneomin

IMHO you can't do that, add slashes after the parameters.
https://developer.mozilla.org/en-US/Learn/Common_q...
But you can pass your data set by adding custom separators, like this:
params?query=a:1,b:2,c:3&other= d:1,g:2 etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question