From acfd7b5e4307af3d600f3e928e0f1a18905bab97 Mon Sep 17 00:00:00 2001 From: Kevin Kowalski Date: Wed, 16 Jun 2021 03:00:55 -0500 Subject: [PATCH] fix(discovery-v2): add enrichment to the form-data --- Scripts/Services/Discovery/V2/DiscoveryService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Scripts/Services/Discovery/V2/DiscoveryService.cs b/Scripts/Services/Discovery/V2/DiscoveryService.cs index 043168fe..93720e40 100644 --- a/Scripts/Services/Discovery/V2/DiscoveryService.cs +++ b/Scripts/Services/Discovery/V2/DiscoveryService.cs @@ -2202,6 +2202,11 @@ public bool CreateEnrichment(Callback callback, string projectId, Cr } req.Forms = new Dictionary(); + if (enrichment != null) + { + byte[] byteArray = Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(enrichment)); + req.Forms["enrichment"] = new RESTConnector.Form(new System.IO.MemoryStream(byteArray), "" ,"application/json"); + } if (file != null) { req.Forms["file"] = new RESTConnector.Form(file, "filename", "application/octet-stream");