Skip to content

Content-Type header #13

@germank

Description

@germank

The Content-Type header isn't propagated when POSTing data. Instead, it's replaced by a form-data type. This is particular issue is problematic when dealing with RESTful services that consumes a particular content-type (application/json, application/xml).
I solved this by adding this line just before the curl_exec:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: '.$_SERVER['CONTENT_TYPE']));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions