Ejemplo n.º 1
0
        private static void AddEventMetadata(EventMetadata metadata, string securityToken)
        {
            string             url     = String.Format($"https://{config.PiraeusHostname}/api/resource/UpsertPiSystemMetadata");
            RestRequestBuilder builder = new RestRequestBuilder("PUT", url, RestConstants.ContentType.Json, false, securityToken);
            RestRequest        request = new RestRequest(builder);

            request.Put <EventMetadata>(metadata);
        }
Ejemplo n.º 2
0
        private static void AddCaplPolicy(AuthorizationPolicy policy, string securityToken)
        {
            string             url     = String.Format("https://{0}/api/accesscontrol/upsertaccesscontrolpolicy", config.PiraeusHostname);
            RestRequestBuilder builder = new RestRequestBuilder("PUT", url, RestConstants.ContentType.Xml, false, securityToken);
            RestRequest        request = new RestRequest(builder);

            request.Put <AuthorizationPolicy>(policy);
        }
Ejemplo n.º 3
0
 public RestRequest(RestRequestBuilder builder)
 {
     this.requestBuilder = builder;
 }