WebPHP is called by Http Client POST in CakePHP 3.6.7, but the returned body part is html format data. CakePHP2.5.2 was processed without any problems, but when upgrading to CakePHP3.6.7, 406 is returned.
In CakePHP 3.6.7, can the body part receive the XML/JSON format data?
Answer # 1
After a lot of trial and error, changing $header as follows worked.
$header = ['headers'=>['Content-Type'=>'application/xml;charset = UTF-8']];
I don't know if this is the correct answer, but for now I'm going to look at it.
Answer # 2
I think you can receive HTML. It seems that 406 has been returned has failed before that.
Since the code is not posted, I guess ...
406 Not Acceptableis returned, there may be a problem with the POST request header.
Did you set
text/htmlto type when making a request?
Refer to the manual for how to specify type.
- xcode - cannot receive api response
- i want to receive fin packets with c language tcp client
- Java Socket programming server response client example code
- Client program for Java Socket communication (1) Send and receive data
- ruby - unable to receive response from aws browser (err_ssl_protocol_error)
- cakephp - no response when pressing the edit button
- how to receive image data from api and display it on the client
- [cakephp]  i can't receive an error message in modelless form
- cannot receive post transmission from android with cakephp
- [cakephp] response after processing
- how to receive response when hitting api in php
- python - cannot receive http response using scapy
- cannot receive value with cakephp
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved