If you encode everything after ?
- you will have to do 1 decode to get the full string
- once done, you will be able to access your parameteres if there is no confusing caracters(you could have issues, if you have = in the values as there will be no distinction between = for a parm value delimiter or inside a value )
If you encode params only
- you will have to decode each values
- you will be able to access your param values straigh away without issues, once decoded (no probleme if values contain = )
This is why I would advise to encode values only, to be sure not to have any confusion with = as param value separators and encoded values :
= in a value will be encoded, so the = you will find after ? will only be for a delimiter
let says you encode everything after ? :
No problem : P1 = "abc" P2 = "123"
P1=abc&P2=123 => encoded => P1=abc&P2=123 => decoded => P1=abc&P2=123
Problem : P1 = "a&b=c" P2 = "12" (improbable but let's say it happens)
P1=a&b=c&P2=12 => encoded => P1=a&b=c&P2b=12b=3a => decoded => P1=a&b=c&P2=12 (a server will see 3 parameters if you try to access GET params : P1 = a, b = c, P2, = 12 )