Hi Erel,
I have been testing the httpUtils code module and service and although it works good I see some practical problems. My main remarks are:
- Using a Jobname and than testing for an URL is not very logical (issucces etc.). Why start using a jobname then?;
- URL's with fast changing parameters (take GPS coordinates for example) wouldn't work. The URL that initiates the PostString could change in under a second with GPS coordinates, so if you want to check with IsSuccess and the url it wouldn't work.;
- Defining process globals for all web service url's that I have wouldn't work either and is a pain.
Real life scenario with GPS
I have built webservices for lots of services and one is GPS tracking. The GPS URL tracking web service looks like this:
http://domain/Location/set/lat/53/long/4.5.json
So I call this with PostString but when I want to check it with issuccess I have a problem, the URL is slightly changed already because my GPS has given me new coordinates already. The coordinates in above URL are variables.
Other problems
The idea of a Jobname is that you can check stuff based on the Jobname. Now in your code you use IsSucces and GetString with an URL instead of a Jobname, that is code style wise at least weird
Also, using the URL's means that for all my URL's I need to define Global variables but that wouldn't work either IMO.
Solution
Change all the code to use Jobnames instead. Link the TaskId to the Jobname and we can do all checking on the JobName. It is much easier to define certain task id's for
all my webservice URL's. Say TaskId 20 is getting the GPS, even when I call this one 10 times in a row it wouldn't be a problem.
I have looked into the code but it isn't really easy to read for me. If you cannot change it that would be a bummer.
Cheers,