Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

$http support at lease three format params as jQuery already does. #6417

Closed
calidion opened this issue Feb 23, 2014 · 2 comments
Closed

$http support at lease three format params as jQuery already does. #6417

calidion opened this issue Feb 23, 2014 · 2 comments

Comments

@calidion
Copy link

1、string based params
'a=1&b=2'
2、object based params
{
a: 1,
b: 2
}
3、FormData object
fd = new FormData()
fd = new FormData($('form').get(0));
fd.append('a', 1);
fd.append('b', 2);

support automatic Content Type detection, ajax file uploading withd FormData
as jQuery does.

@caitp
Copy link
Contributor

caitp commented Feb 23, 2014

This is (at least partially) a duplicate of #3740 --- The rest of this is a feature request which is a different feature request which is not explained very clearly. Please be more clear explaining the second part regarding Content-Type, this may be more actionable, and post a new issue for that.

@calidion
Copy link
Author

i don't think we have anything in common, though i will vote for him.
my focus is on type detection, not on the result data translated.
i think the $http object should be able to automatically detect the request data and automatically specify the right Content Type to the XMLHTTPRequest object.
the ContentTypes of data to be transferred are apparent and limited. no need to specify even if user s want to.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants