Page 1 of 1

HTTP passing variables as part of the URL

Posted: Fri Jul 21, 2023 1:40 pm
by AA5MC
Hello,
we have a web API that passes paramters as if they were subdirectories in the url.

for example:

https://myserver/ourwebapi_subfolder/ap ... d/mystatus

so I created this URL using a variable:
https://myserver/ourwebapi_subfolder/ap ... s/1234567/[Metadata.Text:Dataset="appserver.xml",Model="XML",Path="/JobXML/OmanId"]/59

I get the error:
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


If I take the sample code from the editor and past it in the browser url it works? I know I can connect to API.

so I'm assuming that HTTP app can not handle this type of web API call?

or am I missing something?

Re: HTTP passing variables as part of the URL

Posted: Fri Jul 21, 2023 1:42 pm
by jan_suhr
Have you tried to escape the slashes like \/

Re: HTTP passing variables as part of the URL

Posted: Fri Jul 21, 2023 2:36 pm
by AA5MC
@jan_suhr no never thought of that? so would the hold URL need to be escaped or just the parameter part.

Re: HTTP passing variables as part of the URL

Posted: Fri Jul 21, 2023 2:41 pm
by jan_suhr
The ones inside the variable

Re: HTTP passing variables as part of the URL

Posted: Mon Jul 24, 2023 9:37 am
by freddyp
What is the value of the variable? Everything in an URL has to be URL-encoded: spaces become %20 etc. And you are sure the variable points to something that returns the correct value?