# Base URL for an RO Server

**URL:** https://talk.remobjects.com/t/base-url-for-an-ro-server/9292
**Category:** Remoting SDK
**Tags:** windows, delphi
**Created:** [May 6, 2016, 11:34am UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292 "2016-05-06T11:34:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![JA](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/b77776/32.png) [@JA](https://talk.remobjects.com/u/JA)
#### Post date: [May 6, 2016, 11:34am UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292/1 "2016-05-06T11:34:49Z")

</div>

Greetings,

I am working on a RO (IndyHTTP channel) multi-message Delphi server. I am looking for a way to control the URL the server monitors. I don’t want the default of [http://localhost:8099/soap](http://localhost:8099/soap).

I want it to be [http://localhost:8099/v1/soap](http://localhost:8099/v1/soap).

If that is possible, I would appreciate any suggestions on how to accomplish it.

Thanks - Joe

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [May 6, 2016, 1:11pm UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292/2 "2016-05-06T13:11:21Z")

</div>

You can use [OnCustomResponseEvent](https://docs.dataabstract.com/API/Delphi/TROBaseHTTPServer_Class/#OnCustomResponseEvent).  
example of using this event is shown in this [code snippet](https://talk.remobjects.com/t/using-oncustomresponseevent-in-a-rosdk-server/6767)

it can be like:

```auto
// ROSOAPMessage should be drop to form
// '/v1/soap' string shouldn't be registered in `ROIndyHTTPServer1.Dispatchers`
procedure TMegaDemoServerMainForm.ROIndyHTTPServer1CustomResponseEvent(const aTransport: IROHTTPTransport;
  const aRequestStream, aResponseStream: TStream; const aResponse: IROHTTPResponse; var aHandled: Boolean);
var
  op: TROResponseOptions;
begin
  if AnsiSameText(aTransport.PathInfo,'/v1/soap') then begin
    MainProcessMessage(ROSOAPMessage,atransport,aRequestStream,aResponseStream,op);
    aHandled := True;
  end;
end;

```

---

<div class="post-metadata">

### Author: ![JA](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/b77776/32.png) [@JA](https://talk.remobjects.com/u/JA)
#### Post date: [May 6, 2016, 2:11pm UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292/3 "2016-05-06T14:11:56Z")

</div>

Thank you for the help. That works well.

- Joe

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 7, 2016, 11:30am UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292/4 "2016-05-07T11:30:58Z")

</div>

Also, can’t you just set the Path property of the SoapMessage to whatever you want? /soap is merely the default, not hardcoded…

---

<div class="post-metadata">

### Author: ![JA](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/b77776/32.png) [@JA](https://talk.remobjects.com/u/JA)
#### Post date: [May 9, 2016, 1:07pm UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292/5 "2016-05-09T13:07:14Z")

</div>

I like that suggestion better, but it doesn’t work. I set the Path Info to V1/SOAP for the SOAPMessage in the server’s message Dispatchers and removed the CustomResponseEvent handler. With that config, the server returns an Invalid Path error for all requests directed to V1/SOAP.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 9, 2016, 2:06pm UTC](https://talk.remobjects.com/t/base-url-for-an-ro-server/9292/6 "2016-05-09T14:06:51Z")

</div>

That sounds like a bug. I’ll check with Eugene…
