You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using rest builder as such with success:
def rest = new RestBuilder()
def result = rest.post(url){
contentType "application/json"
json "test"
}
However when I change it to XML as below it doesn't send the XML payload and doesn't get picked up on my API:
def rest = new RestBuilder()
def result = rest.post(url){
contentType "application/xml"
xml "test"
}
I checked send xml via curl and it works fine:
curl -i -X POST -H "Content-Type: application/xml" -d 'test' localhost:8090/TestMe/api
The text was updated successfully, but these errors were encountered:
I tried using rest builder as such with success:
def rest = new RestBuilder()
def result = rest.post(url){
contentType "application/json"
json "test"
}
However when I change it to XML as below it doesn't send the XML payload and doesn't get picked up on my API:
def rest = new RestBuilder()
def result = rest.post(url){
contentType "application/xml"
xml "test"
}
I checked send xml via curl and it works fine:
curl -i -X POST -H "Content-Type: application/xml" -d 'test' localhost:8090/TestMe/api
The text was updated successfully, but these errors were encountered: