Angular 4.0 http put request

后端 未结 3 965
天命终不由人
天命终不由人 2021-01-07 14:13

I\'ve written a function to send a http put request to update some data but it says, that it is not recieving any data:

updateHuman(human: Human) {
    const         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-07 14:39

    In the second example you are not returning the response within the map, you are returning the human that was originally passed in.

    So, basically you are creating an illusion that it is working, when it isn't.

    Probably best to test your API with something like PostMan, to see if you can get it working with that first.

提交回复
热议问题