|
1 | 1 | #Restangular
|
2 | 2 |
|
3 | 3 | [](https://travis-ci.org/mgonto/restangular)
|
4 |
| -[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=martin%40gon%2eto&lc=US&item_name=Martin%20Gontovnikas¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted "Donate once-off to this project using Paypal") |
| 4 | +[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=martin%40gon%2eto&lc=US&item_name=Martin%20Gontovnikas¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted "Donate once-off to this project using Paypal") |
5 | 5 | [](https://www.gittip.com/mgonto/)
|
6 | 6 | <a href="https://twitter.com/intent/tweet?hashtags=&original_referer=http%3A%2F%2Fgithub.com%2F&text=Check+out+Restangular%2C+a+service+for+%23AngularJS+that+makes+it+easy+to+use+Rest+APIs&tw_p=tweetbutton&url=https%3A%2F%2Fgithub.com%2Fmgonto%2Frestangular" target="_blank">
|
7 | 7 | <img src="http://jpillora.com/github-twitter-button/img/tweet.png"></img>
|
@@ -1161,14 +1161,14 @@ With that, you'd get what you need :)
|
1161 | 1161 |
|
1162 | 1162 | #### **How can I send files in my request using Restangular?**
|
1163 | 1163 |
|
1164 |
| -This can be done using the customPOST / customPUT method. Look at the following example: |
| 1164 | +This can be done using the customPOST / customPUT method. Look at the following example: |
1165 | 1165 | ````js
|
1166 | 1166 | Restangular.all('users')
|
1167 | 1167 | .withHttpConfig({transformRequest: angular.identity})
|
1168 |
| - .customPOST(formData, undefined, undefined, |
| 1168 | + .customPOST(formData, undefined, undefined, |
1169 | 1169 | { 'Content-Type': undefined });
|
1170 | 1170 | ````
|
1171 |
| -This basically tells the request to use the *Content-Type: multipart/form-data* as the header. Also *formData* is the body of the request, be sure to add all the params here, including the File you want to send of course. There is an issue already closed but with a lot of information from other users and @mgonto as well: [GitHub - Restangular](https://github.com/mgonto/restangular/issues/420) |
| 1171 | +This basically tells the request to use the *Content-Type: multipart/form-data* as the header. Also *formData* is the body of the request, be sure to add all the params here, including the File you want to send of course. There is an issue already closed but with a lot of information from other users and @mgonto as well: [GitHub - Restangular](https://github.com/mgonto/restangular/issues/420) |
1172 | 1172 |
|
1173 | 1173 | #### **How do I handle CRUD operations in a List returned by Restangular?**
|
1174 | 1174 |
|
|
0 commit comments