Page 1 of 1

Using {variables} in url with a settings service

Posted: Sun Aug 17, 2014 11:25 am
by Peter Mc

Hi,
I am trying to use templated url and a settings service. can this be done?

for example, in my setting service I have:
siteurl http://myhost.com/status/id/{id}/site...

when I put {siteurl} in the url field I get a 400 error Bad request like so:
{"code":"PTCT022","description":"Error while sending request: Illegal character in path at index 30 : http://myhost.com/status/id/{id}/site..."}

Is there a way of making this work?

Thanks


Using {variables} in url with a settings service

Posted: Sun Aug 17, 2014 5:44 pm
by Serhii Kulibaba

Hello Peter,

You use URL template correct. But you should also add variables from curly brackets into request parameters. Appery changes them to their values automatically.