Skip to main content
Question

FME replacing commas in url with characters

  • December 15, 2020
  • 5 replies
  • 27 views

nedwaterman
Contributor
Forum|alt.badge.img+9

Hi,

I'm using FME to query an API. I'm passing long-lats as a comma separated value to the API, but FME is turning the comma into a url character (%2C) so the request is failing. Is there a workaround for this?

Thanks

N

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 15, 2020

Try %2C instead of comma in the url definition. I know it sound stupid but it usually works 😊


nedwaterman
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • December 15, 2020

Try %2C instead of comma in the url definition. I know it sound stupid but it usually works 😊

Ah - thank you! Yes that is wierd but as long as it works...:-)

 


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • December 15, 2020

You can use a TextEncoder set to URL(Percent Encoding) to do this automatically


nedwaterman
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • December 18, 2020

Apologies both but still having problems with this. Whether I use the stringReplacer or TextEncoder there's still an issue.

When I pass my list into the api as

 

3701,3707,3710,3808,3809,3810,3817,3820,3823,3824,3827,3831,3837,3839,3840,3844,99001,99081,99085,99094,99190,2003806,2003839,2003920,2003933,3203069,3203075,3603006,3603007,3603033,3603051,4603039,4603042,4603043,4603044,4603045,4603046,4603047,4603048,4603049,4603050,4603051,4603052,4603053,4603054,4603055,4603056,4603057,4603058,4603126,4603127,4603128,4603129,4603164,4603165,4603166,4603167,4603168,4603169,4603170,4603171,4603172,4603173,4603174,4603175,4603176,4603177,4803028,6103021,6103026,6103034,6103050,6103051,6103063,6103066,6103072,6103077,6103080,6103093,6103099,6103100,6103104,6103129,6103154,6103155,6103161,6103162,6103170,6103173,6103187,6103193,6103211,6103215,6103244,6103274,6103286,6103293,6103302,6103303,6103314,6103317,6103335,6103348,6103351,6103353,6103355,6103364,6103367,6103369,6103392,6103395,6103400,6103402,6103406,6103415,6103430,6103433,6103475,6103507,6103519,6103520,6103532,6103539,6103568,6103574,6103578,6103594,6103621,6103623,6103646,6103647,6103651,6103695,6103696,6103702,6103704,6103709,6103732,6103754,6103759,6103760,6103762,6103780,6103785,6103795,6103802,6103806,6103808,6103813,6103823,6103825,6103828,6103838,6103839,6103840,6103857,6103859,6103866,6103869,6103873,6103880,6103887,6103888,6103889,6103894,3862,3203067,3203073,4603003,4603004,4603005,4603009,4803026,6103471,6103625,6103779

 

its parsed as

 

https://point-observation.weather.mg/observation/search?meteoGroupStationIds=3701%2C3707%2C3710%2C3808%2C3809%2C3810%2C3817%2C3820%2C3823%2C3824%2C3827%2C3831%2C3837%2C3839%2C3840%2C3844%2C99001%2C99081%2C99085%2C99094%2C99190%2C2003806%2C2003839%2C2003920%2C2003933%2C3203069%2C3203075%2C3603006%2C3603007%2C3603033%2C3603051%2C4603039%2C4603042%2C4603043%2C4603044%2C4603045%2C4603046%2C4603047%2C4603048%2C4603049%2C4603050%2C4603051%2C4603052%2C4603053%2C4603054%2C4603055%2C4603056%2C4603057%2C4603058%2C4603126%2C4603127%2C4603128%2C4603129%2C4603164%2C4603165%2C4603166%2C4603167%2C4603168%2C4603169%2C4603170%2C4603171%2C4603172%2C4603173%2C4603174%2C4603175%2C4603176%2C4603177%2C4803028%2C6103021%2C6103026%2C6103034%2C6103050%2C6103051%2C6103063%2C6103066%2C6103072%2C6103077%2C6103080%2C6103093%2C6103099%2C6103100%2C6103104%2C6103129%2C6103154%2C6103155%2C6103161%2C6103162%2C6103170%2C6103173%2C6103187%2C6103193%2C6103211%2C6103215%2C6103244%2C6103274%2C6103286%2C6103293%2C6103302%2C6103303%2C6103314%2C6103317%2C6103335%2C6103348%2C6103351%2C6103353%2C6103355%2C6103364%2C6103367%2C6103369%2C6103392%2C6103395%2C6103400%2C6103402%2C6103406%2C6103415%2C6103430%2C6103433%2C6103475%2C6103507%2C6103519%2C6103520%2C6103532%2C6103539%2C6103568%2C6103574%2C6103578%2C6103594%2C6103621%2C6103623%2C6103646%2C6103647%2C6103651%2C6103695%2C6103696%2C6103702%2C6103704%2C6103709%2C6103732%2C6103754%2C6103759%2C6103760%2C6103762%2C6103780%2C6103785%2C6103795%2C6103802%2C6103806%2C6103808%2C6103813%2C6103823%2C6103825%2C6103828%2C6103838%2C6103839%2C6103840%2C6103857%2C6103859%2C6103866%2C6103869%2C6103873%2C6103880%2C6103887%2C6103888%2C6103889%2C6103894%2C3862%2C3203067%2C3203073%2C4603003%2C4603004%2C4603005%2C4603009%2C4803026%2C6103471%2C6103625%2C6103779&observedPeriod=PT0S%2CPT1H%2CPT3H%2CPT6H%2CPT12H%2CPT24H&fields=airTemperatureInCelsius%2CmaxWindGustInKilometerPerHour%2CsunshineDurationInMinutes%2CtemperatureMaxInCelsius%2CtemperatureMinInCelsius%2CwaterTemperatureInCelsius

 

Can't find a way so far to prevent this from happening!


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 20, 2020

Apologies both but still having problems with this. Whether I use the stringReplacer or TextEncoder there's still an issue.

When I pass my list into the api as

 

3701,3707,3710,3808,3809,3810,3817,3820,3823,3824,3827,3831,3837,3839,3840,3844,99001,99081,99085,99094,99190,2003806,2003839,2003920,2003933,3203069,3203075,3603006,3603007,3603033,3603051,4603039,4603042,4603043,4603044,4603045,4603046,4603047,4603048,4603049,4603050,4603051,4603052,4603053,4603054,4603055,4603056,4603057,4603058,4603126,4603127,4603128,4603129,4603164,4603165,4603166,4603167,4603168,4603169,4603170,4603171,4603172,4603173,4603174,4603175,4603176,4603177,4803028,6103021,6103026,6103034,6103050,6103051,6103063,6103066,6103072,6103077,6103080,6103093,6103099,6103100,6103104,6103129,6103154,6103155,6103161,6103162,6103170,6103173,6103187,6103193,6103211,6103215,6103244,6103274,6103286,6103293,6103302,6103303,6103314,6103317,6103335,6103348,6103351,6103353,6103355,6103364,6103367,6103369,6103392,6103395,6103400,6103402,6103406,6103415,6103430,6103433,6103475,6103507,6103519,6103520,6103532,6103539,6103568,6103574,6103578,6103594,6103621,6103623,6103646,6103647,6103651,6103695,6103696,6103702,6103704,6103709,6103732,6103754,6103759,6103760,6103762,6103780,6103785,6103795,6103802,6103806,6103808,6103813,6103823,6103825,6103828,6103838,6103839,6103840,6103857,6103859,6103866,6103869,6103873,6103880,6103887,6103888,6103889,6103894,3862,3203067,3203073,4603003,4603004,4603005,4603009,4803026,6103471,6103625,6103779

 

its parsed as

 

https://point-observation.weather.mg/observation/search?meteoGroupStationIds=3701%2C3707%2C3710%2C3808%2C3809%2C3810%2C3817%2C3820%2C3823%2C3824%2C3827%2C3831%2C3837%2C3839%2C3840%2C3844%2C99001%2C99081%2C99085%2C99094%2C99190%2C2003806%2C2003839%2C2003920%2C2003933%2C3203069%2C3203075%2C3603006%2C3603007%2C3603033%2C3603051%2C4603039%2C4603042%2C4603043%2C4603044%2C4603045%2C4603046%2C4603047%2C4603048%2C4603049%2C4603050%2C4603051%2C4603052%2C4603053%2C4603054%2C4603055%2C4603056%2C4603057%2C4603058%2C4603126%2C4603127%2C4603128%2C4603129%2C4603164%2C4603165%2C4603166%2C4603167%2C4603168%2C4603169%2C4603170%2C4603171%2C4603172%2C4603173%2C4603174%2C4603175%2C4603176%2C4603177%2C4803028%2C6103021%2C6103026%2C6103034%2C6103050%2C6103051%2C6103063%2C6103066%2C6103072%2C6103077%2C6103080%2C6103093%2C6103099%2C6103100%2C6103104%2C6103129%2C6103154%2C6103155%2C6103161%2C6103162%2C6103170%2C6103173%2C6103187%2C6103193%2C6103211%2C6103215%2C6103244%2C6103274%2C6103286%2C6103293%2C6103302%2C6103303%2C6103314%2C6103317%2C6103335%2C6103348%2C6103351%2C6103353%2C6103355%2C6103364%2C6103367%2C6103369%2C6103392%2C6103395%2C6103400%2C6103402%2C6103406%2C6103415%2C6103430%2C6103433%2C6103475%2C6103507%2C6103519%2C6103520%2C6103532%2C6103539%2C6103568%2C6103574%2C6103578%2C6103594%2C6103621%2C6103623%2C6103646%2C6103647%2C6103651%2C6103695%2C6103696%2C6103702%2C6103704%2C6103709%2C6103732%2C6103754%2C6103759%2C6103760%2C6103762%2C6103780%2C6103785%2C6103795%2C6103802%2C6103806%2C6103808%2C6103813%2C6103823%2C6103825%2C6103828%2C6103838%2C6103839%2C6103840%2C6103857%2C6103859%2C6103866%2C6103869%2C6103873%2C6103880%2C6103887%2C6103888%2C6103889%2C6103894%2C3862%2C3203067%2C3203073%2C4603003%2C4603004%2C4603005%2C4603009%2C4803026%2C6103471%2C6103625%2C6103779&observedPeriod=PT0S%2CPT1H%2CPT3H%2CPT6H%2CPT12H%2CPT24H&fields=airTemperatureInCelsius%2CmaxWindGustInKilometerPerHour%2CsunshineDurationInMinutes%2CtemperatureMaxInCelsius%2CtemperatureMinInCelsius%2CwaterTemperatureInCelsius

 

Can't find a way so far to prevent this from happening!

The API should work regardless of the encoding of commas.

What error message are you getting?

Maybe you got the parameters order wrong. You should see more examples here