[Solved] Converting CURL command to .NET
Here is what I came up with based on the example posted by @M.Hassan Public Function UPLOAD_FILE(filepath As String) As String Dim request As WebRequest = WebRequest.Create(“http://localhost:8042/instances “) request.Method = “POST” Dim byteArray As Byte() = File.ReadAllBytes(filepath) request.ContentType = “application/x-www-form-urlencoded” request.ContentLength = byteArray.Length Dim dataStream As Stream = request.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim response … Read more