Skip to main content

I am using Aggregator and HTTPCaller in conjunction with eachother to create an API POST URL and am having issues with the Aggregator output and URL encoding.

 

I'm using Aggregator to concatenate and merge records and am using a separator of "&fee_id=" as the field will end up as part of the query string parameters:

Aggregator ParametersThe output is correct:

Account IDBut when I run HTTPCaller and view the URL that ends up getting generated in the translation log, only the "&fee_id=" that was added by the aggregator gets messed up.

 

Example:

https://TARGETURL.COM?api_key=KEY&amount=2000&PARAM1=50&payment_method=PYMT&paid_timestamp=20220628000000&transaction_id=yna4EcJMDk6gBvcEce0wlg&fee_id=EPVDnnsMl0K9Qj91eyKOWg%26fee_id%3DXjix%2FpQsd0aKiT9Ikn4aWw

 

I have tried various combinations and orders of the TextEncoder, TextDecoder and StringReplacer transformers to try and force the URL to format correctly, but I'm not having any luck. I've also tried setting different Content Types in HTTPCaller.

 

Anyone have any suggestions, or maybe an alternate way of accomplishing this? I would like to use FME to do the aggregation of the field instead of doing it DB-side if possible.

 

Hey @blinge​ I was going to suggest checking the Content Type in the HTTPCaller, but it sounds like you've done this plenty. What version of FME are you using here? I can't seem to reproduce this in 2022.0, but maybe I am doing something slightly different in my workspace? Best, Kailin


Hey @blinge​ I was going to suggest checking the Content Type in the HTTPCaller, but it sounds like you've done this plenty. What version of FME are you using here? I can't seem to reproduce this in 2022.0, but maybe I am doing something slightly different in my workspace? Best, Kailin

Hi @kailinatsafe​ 

 

Thank you for your suggestion, I am using 2022.0 so it wasn't that. However, I was able to resolve my issue!

 

In the end, I used the "Generate List" option in Aggregator instead of trying to concatenate the attribute values. I was then able to populate the list items into my query string parameters and it formatted the URL correctly.

 


Hi @kailinatsafe​ 

 

Thank you for your suggestion, I am using 2022.0 so it wasn't that. However, I was able to resolve my issue!

 

In the end, I used the "Generate List" option in Aggregator instead of trying to concatenate the attribute values. I was then able to populate the list items into my query string parameters and it formatted the URL correctly.

 

That's awesome @blinge​! Thank you for the update. Best, Kailin.


Reply