0

I stumbled upon a strange issue and cant find quick solution to deal with it. Front side of my application sends query to back-end I added square brackets for readability.

as it should be http://localhost:3000/?params=[First_value],[Anhui Jantene Hone Textiles Co., Ltd.],[Third_Value]

as it is http://localhost:3000/?params=[first_value],[Anhui Jantene Hone Textiles Co.], [Ltd.],[Third_Value]

params are serialized to List but there is a problem when given value on a front-side has comma in the name, then instead of one value I get 2 entries. In a given example expected size of a list should be 3 but I get 4 elements.

Any help is appreciated

mihu
  • 37
  • 5

1 Answers1

0

You can't do this in the query string because of how a comma is treated. You need to use a POST with a request body like this:

["First_value", "Anhui Jantene Hone Textiles Co., Ltd.","Third_Value"]
John Williams
  • 4,252
  • 2
  • 9
  • 18
  • Apparently, there is a way. https://stackoverflow.com/questions/11889997/how-to-send-an-array-in-url-request – mihu Feb 16 '23 at 12:59