cancel
Showing results for 
Search instead for 
Did you mean: 

Mock Service: mockRequest.requestContent is NULL (HTTP PUT)

Highlighted
Moderator

Re: Mock Service: mockRequest.requestContent is NULL (HTTP PUT)

HI @vikititor,

 

In the Dispatch script, a request content can be retrieved as follows:

mockRequest.getRequestContent()

In the latest ReadyAPI version it works for POST, PUT and the other supported HTTP methods.

 

Please check the screenshot:

2019-11-13_14-20-27.png

 

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

 

Natalie
Customer Care Team

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Contributor

Re: Mock Service: mockRequest.requestContent is NULL (HTTP PUT)

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..

Community Hero

Re: Mock Service: mockRequest.requestContent is NULL (HTTP PUT)

Hi,

 

Have you seen my reply here: https://community.smartbear.com/t5/Service-Virtualization-Virtual/how-MOCK-read-request-data-from-at... ?
Does it help?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================