Monday 15 August 2011

.net - DotNetOpenAuth submit multipart/form-data -


Whether to upload files with the DotNet OpenOff and to submit through multipart / form-data, Samples Available?

There is no sample to use it, but here's how you use the PostMultiPart method. New DotNetOpenAuth V3.3

  using DotNetOpenAuth.Messaging; Web consumer consumer; // You have started this var endpoint - New Message Recording EndPoint (URL, http deliverymops.poomerexquest.http.details authorization headerRequest); IDirectWebRequestHandler RequestHandler = Consumer Channel. Webrequesthandler; Var parts = new list & amp; MultipartPostPart & gt; (); Parts.Add (MultipartPostPart.CreateFormPart ("key", "value")); Parts.Add (MultipartPostPart.CreateFormPilePart ("filefield", "c: \ temp \\ foo.txt", "text / plain")); HttpWebRequest req = consumer.PrepareAuthorizedRequest (endpoint, token); Incoming web dispatch response = req.PostMultiPart (Request Handler, Part); // Yes, this is an extension method  

No comments:

Post a Comment