-2
A
回答
1
使用Content-Type: application/x-www-form-urlencoded
時,請使用改爲;
import { URLSearchParams } from '@angular/http';
和您的文章函數內部,不發你的對象body
,而不是這樣做:
let postBody = new URLSearchParams();
postBody.set('yourProperty1', body.yourProperty1);
postBody.set('yourProperty12', body.yourProperty2);
...
return this._htpp.post('yourUrl', postBody, options)
.map(...)
相關問題
- 1. Angular 2:Http POST錯誤
- 2. Symfony 2 Angular JS HTTP POST
- 3. Angular 2 http post + Nodejs express
- 4. Angular 2,http post不工作
- 5. Angular 2 urlencoded在http post
- 6. Angular 2 HTTP post no HTTP-resource found
- 7. Django&Angular 2 Error {_dataService:undefined}
- 8. Angular 2 Promise throw error
- 9. Angular 2+ HTTP POST和GDrive API。與名字
- 10. Angular 2 Http post run獲取錯誤
- 11. Angular 2 Http-Post不能正常工作
- 12. angular 2 http post方法意外的JSON輸入結束
- 13. Angular 2 http post null Web Api Core
- 14. Ionic 2 cordova http error
- 15. Angular 2 http post在json對象周圍添加引號
- 16. Android URL和HTTP Post Error
- 17. Angular 2 RC 4 Http post not firing
- 18. angular 2 http withCredentials
- 19. Angular 2 http stub
- 20. HTTP POST not working.Getting Not Found error
- 21. Dynamic/Reactive Forms Error - Angular 2
- 22. angular $ http post with headers
- 23. Angular 2 Http錯誤
- 24. Angular 2 HTTP無效
- 25. Angular 2 HTTP GET相當於Angular HTTP GET
- 26. Angular $ http POST to target =「_ blank」
- 27. Angular 2 http服務
- 28. Angular 2 http calls
- 29. HTTP Angular 2?
- 30. VS 2012:Post Build xcopy error 2
請隨時發佈您的代碼在你的問題* *代碼以及任何錯誤消息:) – Alex
請閱讀如何在此處提問:http://stackoverflow.com/help/how-to-ask – CodeLikeBeaker