HTTP passing variables as part of the URL

Post Reply
AA5MC
Newbie
Posts: 9
Joined: Wed Jun 21, 2017 8:38 pm

HTTP passing variables as part of the URL

Post 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?
Last edited by AA5MC on Fri Jul 21, 2023 2:37 pm, edited 1 time in total.
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: HTTP passing variables as part of the URL

Post by jan_suhr »

Have you tried to escape the slashes like \/
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
AA5MC
Newbie
Posts: 9
Joined: Wed Jun 21, 2017 8:38 pm

Re: HTTP passing variables as part of the URL

Post by AA5MC »

@jan_suhr no never thought of that? so would the hold URL need to be escaped or just the parameter part.
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: HTTP passing variables as part of the URL

Post by jan_suhr »

The ones inside the variable
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: HTTP passing variables as part of the URL

Post 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?
Post Reply