Closed jagadeesh1492 closed 8 years ago
I have same Problem. have You had solution to fix that ? @jagadeesh1492
i was moving to another approach by executing curl command in curl exe..its worked now.
Jagadeesh Govindaraj
i meet same problem,do me a favour,thanks.
When i post a curl url i was facing this strange issue
message {"Object contains non-primitive or non-blittable data."} at System.Runtime.InteropServices.GCHandle.InternalAlloc(Object value, GCHandleType type) at System.Runtime.InteropServices.GCHandle.Alloc(Object value, GCHandleType type) at CurlSharp.CurlEasy.getHandle(Object obj) in d:\sharedfiles\Jagan\CurlSharp-master\CurlSharp-master\CurlSharp\CurlEasy.cs:line 1526 at CurlSharp.CurlEasy.setReadData(Object data) in d:\sharedfiles\Jagan\CurlSharp-master\CurlSharp-master\CurlSharp\CurlEasy.cs:line 252 at CurlSharp.CurlEasy.set_ReadData(Object value) in d:\sharedfiles\Jagan\CurlSharp-master\CurlSharp-master\CurlSharp\CurlEasy.cs:line 330 at Upload.Upload.Main(String[] args) in d:\sharedfiles\Jagan\CurlSharp-master\CurlSharp-master\Samples\Upload\Upload.cs:line 36
Curl command is
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: SIMPLE Y2F0Y2h0aGVtb21lbjpjYXRjaHRoZW1vbWVudDExMQ==" -F "card={\"text\":\"sometext\", \"userName\":\"%USERNAME%\", \"screenName\":\"screenName\", \"avatarUrl\":\"https://www.google.com/images/srpr/logo11w.png\"};type=application/json" -F "pic=@c:\users\my\desktop\download.jpg" "https://socialwall.cvent.com/livestream/api/event/395b4759-8b93-4fb1-b33b-387c3928c1ca/socialpost" -v
below code is my implementation of above curl command
public static void Main(String[] args) { try {