# Is it possible to use variables in Web Service URL?

**URL:** <https://forum.katalon.com/t/is-it-possible-to-use-variables-in-web-service-url/6344>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [April 4, 2017, 10:10am UTC](https://forum.katalon.com/t/is-it-possible-to-use-variables-in-web-service-url/6344 "2017-04-04T10:10:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [April 4, 2017, 10:44am UTC](https://forum.katalon.com/t/is-it-possible-to-use-variables-in-web-service-url/6344/4 "2017-04-04T10:44:00Z")

</div>

Hi there,

Regard to your question: Katalon Studio didn’t support from test object view. However, you are freely to do this in test script using ‘setRestUrl’ function, e.g:

`RequestObject request = findTestObject('REST_CommentDetails')`

`'Change Rest URL'`  
`request.setRestUrl(GlobalVariable.katalonUrl + "/path/to/something")`

`'Send a REST request after its URL has been changed'`  
`def response = WS.sendRequest(request)`

There are also lots of APIs to support you changing request / response object in test script. Please refer to these APIs docs:

[http://api-docs.katalon.com/studio/v4.5.0/api/com.kms.katalon.core/com/kms/katalon/core/testobject/RequestObject.html](http://api-docs.katalon.com/studio/v4.5.0/api/com.kms.katalon.core/com/kms/katalon/core/testobject/RequestObject.html)

[http://api-docs.katalon.com/studio/v4.5.0/api/com.kms.katalon.core/com/kms/katalon/core/testobject/ResponseObject.html](http://api-docs.katalon.com/studio/v4.5.0/api/com.kms.katalon.core/com/kms/katalon/core/testobject/ResponseObject.html)

---

_[View the full topic](https://forum.katalon.com/t/is-it-possible-to-use-variables-in-web-service-url/6344)._
