0
votes

I am trying to make a rest call via the http connector. I build the payload as a string, then when I am trying to send it to the client, I am getting the following error:

org.mule.api.MessagingException: Error sending HTTP request. Message payload is of type: String

the string looks as follows:

{
    "firstName": "Nathan4",
    "lastName": "Tregillus",
    "email": "[email protected]"
}

at this time I am just confused. is there only one type of body I can send?

1
Were you able to set the Content-Type as application/json prior to making a rest call? - Ralph Rimorin
Show your config and show the full exception. It's impossible to help with such partial information. - David Dossot

1 Answers

0
votes

Since you do not show your config I would suspect that there is some problems your mule instance and the service you're consuming, or the remote endpoint is having trouble generating the response. So you can check your config:

  • Methods (POST or Get)
  • Path
  • config-ref
  • name