Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURLOPT_POST #52

Open
dietcheese opened this issue Feb 22, 2022 · 0 comments
Open

CURLOPT_POST #52

dietcheese opened this issue Feb 22, 2022 · 0 comments

Comments

@dietcheese
Copy link

Was getting 400 errors when creating relationships, i.e.

$SugarAPI->linkRecords($module,$id,$relationship_link,$related_id);

Found that the configureType() method in /src/Request/Abstracts/AbstractRequest.php (line 240) was setting this option:

$this->setOption(CURLOPT_POST, true);

I believe this option was overriding the application/json content type headers on the request, which was causing the issue.

I resolved this by commenting out the following:

/src/Request/Abstracts/AbstractRequest.php (line 240)

$this->setOption(CURLOPT_POST, true);
break;

Hope that helps someone.

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

No branches or pull requests

1 participant