"GET"
and "POST"
are two different HTTP request methods (https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)
"GET" typically reads data from a server while
"Post" typically submits data to a server.
These are Web Server/Web Service defined outside of JMP/JSL
In your first example, you are "POST"-ing (aka submitting) data to "http://fc8tdbitmapconvs07:11111/daas/" and telling the service that ctfn is the JSON content to use.
In Attempt#1, the goal is "GET"-ting the status of a running job. I'm not sure what the service is, but if the endpoint is "http://fc8tdbitmapconvs07:11111/daas/status/", then you'd want something like:
request2 = New HTTP Request(
url( "http://fc8tdbitmapconvs07:11111/daas/status/" ),
Method( "GET" )
);
data2 = request2 << Send;
Since you wouldn't be submitting anything to the server in a GET.
Additionaly, "Content-Type:application/json" is used to describe the content you are sending (not really appropriate in a GET since you are recieving data and probably ignored by the web server)
Content-Type: headers are what you are sending (these are automatically set by HTTP Request)
Accept: headers are what you tell the web server you'd like.
request << Get MIME Type
will tell you what the web server sent. (most web servers set this, but it can be empty)
Keep in mind, too that after any
request << Send
You can do
request << Get Status; //this is the http status code
request << Get Status Message; //this is the message from the server
to investigate any error message the Web Service emits.
HTH