linclark / angular-serializer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

angular-serializer

Proof of concept for angular/angular.js#6039

Usage

  1. Add linclark.serializer as a dependency
  2. Add a Content-Type header to your request.
  $http({
    method: 'POST',
    url: 'destination',
    data: {
      "user": {
        "email": "test.serializer@example.com",
        "password": "foobar"
      }
    },
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  });

Currently, only x-www-form-urlencoded is supported, and only for serialization of requests, not deserialization of responses.

About

License:MIT License


Languages

Language:JavaScript 100.0%