Does a query string parameter (whose value is null) pass without an equal sign?

Option 1:

 file.jsp?parameter1=&parameter2=abc

Option 2:

 file.jsp?parameter1&parameter2=abc

I know that variation 1 is considered valid, but is variation 2 considered valid? In particular, there is no value for the parameter, is the equal sign mandatory in this case?

+4
source share
1 answer

I think the query parameter with the parameter name only matters.

If you are familiar with Java, look at the @see UriComponentsBuilder QueryParam function, by default it does this for any query parameter with zero.

, URI (,? foo ? foo = bar.

. . url , ?

+2

All Articles