I am using wp_remote_post
to send a request to a 3rd parti API. The response from the API looks something like:
I understand that this is returned in the body
of the array returned by wp_remote_post
, but I’m having problems checking the value of status
. here’s what I’ve got:
This results in NOTHING being echo
ed. I know the call was successful because I receive the email notification from the 3rd party saying a member was just updated (and I can see the updates in their app). If I change echo 'Status: ' . json_decode($response['body'])['status'];
to echo '<pre>' . print_r($response['body']) . '</pre>';
, the object above is printed to screen, so I’m guessing I’m doing something wrong with json_decode
.
here’s the full response, in case it helps:
Can anyone tell me the correct way to get the value of the status
property returned in the body
object of the response?
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com