This repository was archived by the owner on Jul 30, 2018. It is now read-only.

Description
Hey,
currently writing an "auth" module using core/request and wonder if the parsing of querystrings could go to the request module as a responseType because I think it is common (?) :
import { UrlSearchParams } from '../../core/src/main';
/**
* Add a filter that automatically parses incoming querystrings.
*/
filterRegistry.register(
function (response: Response<any>, url: string, options: RequestOptions) {
return typeof response.data && options && options.responseType === 'querystring';
},
function (response: Response<any>, url: string, options: RequestOptions): Object {
return {
data: (new Parameters(String(response.data))).get()
};
}
);