1

I have a request of this format:

http://localhost:2534/members/all/33/AlzdpoiasklnlasEE==

but, when I send a request to my API Endpoint, the == is always missing.

So, the parameter value would be just AlzdpoiasklnlasEE.

Am I missing anything here?

etrupja
  • 2,710
  • 6
  • 22
  • 37
  • "=" is a reserved character in/for URLs, you have to encode them (AlzdpoiasklnlasEE%3D%3D) and then decode it on the server side – Marc Apr 01 '19 at 20:02
  • Possible duplicate of [Trouble in passing "=" (equal) symbol in subsequent request - Jmeter](https://stackoverflow.com/questions/19994959/trouble-in-passing-equal-symbol-in-subsequent-request-jmeter) For the fix: https://stackoverflow.com/q/6544564/215552 – Heretic Monkey Apr 01 '19 at 20:21

2 Answers2

0

= is a reserved character.

Additional info here:

Pierre
  • 794
  • 5
  • 15
0

If you are trying to send it as part of URL, this has to be encoded using encodeURIComponent since it is a reserved character. EX:

encodeURIComponent('AlzdpoiasklnlasEE==') // will return "AlzdpoiasklnlasEE%3D%3D"

URLs do not allow many special characters, like spaces or slashes. However these special characters are part of life, so URL is needed.

You can use decodeURIComponent at server to reverse a string's URL encoding and and get normal text value.

Characters that are reserved within a query component and/or have special meaning within a URI/URL:

 reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","

The "reserved" syntax class above refers to those characters that are allowed within a URI, but which may not be allowed within a particular component of the generic URI syntax. Characters in the "reserved" set are not reserved in all contexts. The hostname, for example, can contain an optional username so it could be something like ftp://user@hostname/ where the '@' character has special meaning.

Community
  • 1
  • 1
nircraft
  • 8,242
  • 5
  • 30
  • 46