You'll need to encode the request url, try putting it in an attribute and then run that through the TextEncoder, with the encoding type set to url (percent encoding), it'll replace the @ with %40 which will make the HTTPCaller accept it.
The 'problem' here is that FME uses the @ to refer to built-in functions.
You'll need to encode the request url, try putting it in an attribute and then run that through the TextEncoder, with the encoding type set to url (percent encoding), it'll replace the @ with %40 which will make the HTTPCaller accept it.
The 'problem' here is that FME uses the @ to refer to built-in functions.
Yes, replacing the @ with something else will work. But then I have to replace the data at the server side with the @ again, because the Post Data does not do this normaly. Using a Get request the server will understand %40 is an @ sign.
Not all @ characters are used by FME to refer to built-in functions:
Writing @Value@Va(@Value(_count)) in an AttributeCreator will result in @Value@Va(1) and not in an error that it does not know the function Va.
Additional test:
foo = bar
a = Va
b = lue
test = @@Value(a)@Value(b)(foo)
will result in
test = @Value(foo)
and not in
test = bar
There is probably a way FME tells itself not to evaluate @Value(foo)
So it seems there is a bug in FME where it want's to evaluate the POST String @ without checking if there is a function name between the @ and the (.
See the attached Workbench for testing
Test HTTPCaller GET POST.fmw
I expect the postman server to answer .
The results
GET
POST
url_encode
a%40b.c
a%40b.c
no encoding
a@b.c
error
This shows that with a GET request FME does this character encoding itself. But with a POST request there should be no encoding because @ is a valid character in a POST string value. Values are separated by something like
boundary=--
Hi @jkr_da,
I'm sorry that you have run into this problem, it is a known issue filed under FMEENGINE-58185. As a workaround it might be possible to configure the HTTPCaller to submit the request using 'Specify Upload Body' and set the Content-Type Header to multipart/form-data such as the example in the accepted answer to this post: https://knowledge.safe.com/questions/28528/httpcaller-file-post.html
I will update this post once this issue is fixed.