Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest Client Builder: 2.2.1 Doesn't send XML but does send JSON #43

Open
zaccak opened this issue Oct 3, 2015 · 1 comment
Open

Rest Client Builder: 2.2.1 Doesn't send XML but does send JSON #43

zaccak opened this issue Oct 3, 2015 · 1 comment

Comments

@zaccak
Copy link

zaccak commented Oct 3, 2015

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

@zaccak
Copy link
Author

zaccak commented Oct 3, 2015

FYI, this was also raised here: grails/grails-data-mapping#561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant