Hello everyone,
I need to make a call to a php form located in an external system, in the call I also need to pass a parameter to receive a 0 as a result, since if I pass the empty parameter it returns a 1, is it possible to perform this task from a script? , I have tried making a rest call but I always get the value 1.


Script:
import groovyx.net.http.RESTClient;
import groovyx.net.http.HttpResponseDecorator;
import groovyx.net.http.HttpResponseException;
import com.atlassian.jira.util.json.JSONException
import com.atlassian.jira.util.json.JSONObject
import static groovyx.net.http.ContentType.*;
def body_req = [
"texto": "hola"
]
RESTClient client = new RESTClient('http://tic.eroski.es/');
HttpResponseDecorator respPost = (HttpResponseDecorator) client.post(
path : '/codigo/tic_finan/tic_finan_test.php',
body : body_req,
requestContentType: JSON
)
return respPost.getData()
Regards.