asp.net - C# Sending an object through HttpClient to a Web API -


I have a WindowsForm application and I have a list & lt; & Gt; Want to send For the web API

Here is my code in the window code:

  Ury uri = new ury ("http: // localhost / test / api / v1 / name / Testcontroller / "); HTTP Client Client = New HTTP Client (); Customer Base Academy = Yuri; Var MediaType = New MediaTypeHeaderValue ("App / JS"); Var jsonFormatter = New JsonMediaTypeFormatter (); HttpContent content = new object communication & lt; List & amp;; Termbasefile & gt; & Gt; (Termbase List, JasonFormer); HttpResponseMessage responseMessage = client.PostAsync (Yuri, content) .Result;   

What should I put in the controller to get the list?

You need to implement a post action, Type, or more specifically an object, such an object which possesses similar properties such as

  public-class termbase file postdates {// related properties go here} Public Class Test Controller: API Controller {PUBLIC HTTPPRESS PacesMsg Trust (list and lt; Trmbajhfaildau & gt; list) {...}}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -