# Send a credencial (string) at every execution to server

**URL:** https://talk.remobjects.com/t/send-a-credencial-string-at-every-execution-to-server/27082
**Category:** Remoting SDK
**Tags:** delphi
**Created:** [August 11, 2022, 8:42pm UTC](https://talk.remobjects.com/t/send-a-credencial-string-at-every-execution-to-server/27082 "2022-08-11T20:42:21Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [August 12, 2022, 7:04am UTC](https://talk.remobjects.com/t/send-a-credencial-string-at-every-execution-to-server/27082/2 "2022-08-12T07:04:39Z")

</div>

Hi,

You can send it in HTTP header.

```auto
ROIndyHTTPChannel1.IndyClient.Request.CustomHeaders.AddValue('myheader','myvalue');

```

on server-side you can read it in Service.OnGetDispatchInfo event:

```auto
procedure TNewProjectService.RORemoteDataModuleGetDispatchInfo(
  const aTransport: IROTransport; const aMessage: IROMessage);
var
  s: string;
begin
  s := (aTransport as IROHTTPTransport).Headers['myheader'];
end;

```

if you like to pass user credential and process it **before** execution of service method, you can use [HTTPServer.OnCustomResponseEvent](https://docs.remotingsdk.com/API/Delphi/Classes/TROBaseHTTPServer/#OnCustomResponseEvent) event.

check for more info in [Using OnCustomResponseEvent in a ROSDK Server](https://talk.remobjects.com/t/using-oncustomresponseevent-in-a-rosdk-server/6767) snippet.

---

_[View the full topic](https://talk.remobjects.com/t/send-a-credencial-string-at-every-execution-to-server/27082)._
