If the counterparty uploads my image through the API, how can I send it back to the counterpart?

I use php to write an uploaded API for IOS APP to use
just assume that the counterpart has successfully sent back
how can I send 200 back to the counterpart?
how can I implement this 200response
so that the other party can access it?

Mar.17,2021

there is no difference between api and other rest api uploading avatars, except for the different data formats of post. You can reply as you should


    .
  1. generally defaults to 200, if you don't return it in the script.
  2. explicitly states that you can use header ('HTTP/1.0 200 OK'); , or http_response_code (200) in PHP5.4+ environments;
  3. however, I personally recommend returning JSON,. For example, if the transmission is normal and there is no error, you can return a string with error code and error message, such as {"ErrCode": "0", "ErrMsg": "OK"} . This will be easier to debug, and it will be easier to troubleshoot the error
  4. .
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b363a5-2ad3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b363a5-2ad3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?