Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 678 Bytes

README.md

File metadata and controls

39 lines (29 loc) · 678 Bytes

HttpPostSerializer

Installation

Install as NuGet package:

Install-Package HttpPostSerializer

.NET CLI:

dotnet add package HttpPostSerializer

Basic Usage

class POCO {
  [HttpProperty("id")]
  public int Id { get; set; }
  
  [HttpProperty("firstname")]
  public string FirstName { get; set; }
    
  [HttpProperty("lastname")]
  public string LastName { get; set; }
}

static void Main(string[] args) {
  var poco = new POCO() {
    Id = 1,
    FirstName = "John",
    LatName = "Doe"
  };
  
  FormUrlEncodedContent content = HttpPostConverter.SerializeObject(poco);
}