Skip to content

Conversation

@bsparacino
Copy link

I am using your REST Client/Server libraries along with your curl library.
I noticed that when sending a PUT request from client to server, the server would receive the data but it wouldn't be in a proper format such as below.

------------------------------22061304c7a1
Content-Disposition: form-data; name="id"
15

After messing around I determined it to be the curl library.
I then found this article: http://www.lornajane.net/posts/2009/putting-data-fields-with-php-curl

It states that for PUT via curl you should use:
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));

After adding http_build_query I am now able to receive data in a proper array format on the REST server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant