Skip to content

Commit acfd7b5

Browse files
committed
fix(discovery-v2): add enrichment to the form-data
1 parent f83b6ad commit acfd7b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Scripts/Services/Discovery/V2/DiscoveryService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,11 @@ public bool CreateEnrichment(Callback<Enrichment> callback, string projectId, Cr
22022202
}
22032203

22042204
req.Forms = new Dictionary<string, RESTConnector.Form>();
2205+
if (enrichment != null)
2206+
{
2207+
byte[] byteArray = Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(enrichment));
2208+
req.Forms["enrichment"] = new RESTConnector.Form(new System.IO.MemoryStream(byteArray), "" ,"application/json");
2209+
}
22052210
if (file != null)
22062211
{
22072212
req.Forms["file"] = new RESTConnector.Form(file, "filename", "application/octet-stream");

0 commit comments

Comments
 (0)