Hi Forge Community, 

Does the OnBeforeRequestAdvanced action of a consumed REST API get executed when testing the API in Service Studio? 

Thanks, 

Nicholas

Yes, it should. It is a callback that is invoked on the server hosting the API and will get executed as soon as the API is called by a consumer.

What is the issue you are having?

Apologies, my brain is all over the place. Actually, I am not certain that it will execute when testing. 

To be certain it executes, you would need to create an action that calls the API. You will then be able to debug the callback.

Hi Hanno, 

Thanks for the response. 

We are attempting to perform a secure web service using the HTTPS Consumer Forge component.

We have yet to be successful in connecting to the server hosting the API using the testing facility in Service Studio and we are trying to determine where the issue might be. 

Seeing as the On Before Request is called when testing, the issue is more likely to do with our own configurations. 

Hanno wrote:

Apologies, my brain is all over the place. Actually, I am not certain that it will execute when testing. 

To be certain it executes, you would need to create an action that calls the API. You will then be able to debug the callback.

Thanks for the correction. I agree, an action used for testing appears to be the only way to check. 

It would be very convenient if the testing functionality does make use of the On Before Request. I will do some testing and revert on this forum. 

Note that sometimes you might need to override some of the header values that get sent as well, as the platform server tends to append (Not when running the Test) ";utf-8" to for instance the Content-Type or Accept Headers.

Nicholas, have you managed to successfully test?