Mock Service: mockRequest.requestContent is NULL (HTTP PUT)
mockRequest.requestContent is always NULL if PUT method is used although request is sent with some text in request body and Content-Length is set with appropriate value in HTTP headers.
If HTTP action is changed to POST then mockRequest.requestContent is populated correctly.
Is it a bug or do I miss something?
In the Dispatch script, a request content can be retrieved as follows:
In the latest ReadyAPI version it works for POST, PUT and the other supported HTTP methods.
Please check the screenshot:
Please double-check your configuration and if it still does not work for you as expected, submit a new support case: https://support.smartbear.com/message/?prod=ReadyAPI
Customer Care Team
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
OK, OK.. on this place dispacher script this works...
But before I will send the response, I need create it.. How to transform readed value from this script to the response script?
Because I just tryed on response script, where this was really not working.
This is my needs.
* read request send to MOCK server, parse some values
* prepare response to AUT using this values
* solution must be thread save, because my AUT sends a lot of requests per seccond. I can not use properties..
Have you seen my reply here: https://community.smartbear.com/t5/Service-Virtualization-Virtual/how-MOCK-read-request-data-from-at... ?
Does it help?
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.