How request.setRequestBody() work in rest mesaage

Saroj Patel
Tera Expert

setRequestBody(String body)

Sets the body content to send to the web service provider when using PUT or POST HTTP methods.

When you set the body content using this method, variables in the body are not substituted for parameters from the REST message function record.

You must explicitly define all values within the REST message body.

 

Please explain me the last line because i haven't set any content body in my rest message still it is working . so what does last line say ..??

1 ACCEPTED SOLUTION

Kieran Anson
Kilo Patron

It means that the full body message you specifying will be set. Some of the functions allow for variable substitution marked with ${} syntax. setRequestBody() allows you to completely overwrite this and send a body you define.

View solution in original post

2 REPLIES 2

Kieran Anson
Kilo Patron

It means that the full body message you specifying will be set. Some of the functions allow for variable substitution marked with ${} syntax. setRequestBody() allows you to completely overwrite this and send a body you define.

Thank You Kieran , got it.