Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 795 Bytes

File metadata and controls

23 lines (16 loc) · 795 Bytes

Angular POST interceptor Build Status

Encodes POST requests to application/x-www-form-urlencoded format.

Behaves like jQuery.param (in fact, is based on v2.1.1 of jQuery), but does not conflict with angular resources, and does not require additional dependencies.

Getting started

  1. Link script
<script src="bower_components/angular-post-urlencoded/dist/post-urlencode.js"></script>
  1. Configure Angular to use interceptor
angular.module('main', ['http-post-urlencoded'])
.config(function interceptPOSTRequests($httpProvider) { // Proper post request data encoding
	$httpProvider.interceptors.push('postUrlencodeInterceptor');
})