The amount of CURL POST data is too large and the information from the server cannot be received.

WBOY
Release: 2016-10-19 10:40:53
Original
2281 people have browsed it

1. What I encountered while working on a project today was that when adjusting the interface POST data, the amount of POST data was too large, resulting in no return information being received.

2. After some searching on Baidu, I found out that I need to set a header information. After trying it, it didn’t work. I don’t know if it is a problem with the TP framework?
That’s it: curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

3. So when the CURL POST data is too large, are there any other methods?

Reply content:

1. What I encountered while working on a project today was that when adjusting the interface POST data, the amount of POST data was too large, resulting in no return information being received.

2. After some searching on Baidu, I found out that I need to set a header information. After trying it, it didn’t work. I don’t know if it is a problem with the TP framework?
That’s it: curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

3. So when the CURL POST data is too large, are there any other methods?

First use the interface debugging tool to test the interface, Google's postman or paw under mac, set the parameters, post, and see if there is return data;
The framework will not affect the curl access interface;
Check the code to make sure curl uses post Data passed

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!