agile-crm

symfony2: how to integrate a php library which is not a bundle

半腔热情 提交于 2019-12-13 16:44:16
问题 I am trying to integrate Agile CRM in my Symfony2 application. There is a PHP library provided by Agile : https://github.com/agilecrm/php-api However it's not a bundle. How can I integrate it correctly in my application? Should I put a require once in my app.php or my kernel? Or is there a better way? 回答1: Composer has a feature to auto load files https://getcomposer.org/doc/04-schema.md#files { "autoload": { "files": ["src/MyLibrary/functions.php"] } } Other ways ? Expose the functionality

Phoenix/Elixir - cURL works, but HTTPoison fails

我的未来我决定 提交于 2019-12-11 15:25:56
问题 In my Phoenix app, I am trying to use the HTTPoison HTTP client (https://hexdocs.pm/httpoison/api-reference.html) to make a post request to the AgileCRM API. I was able to use cURL to make a successful request, but my attempt to replicate it in Phoenix is failing with a 401 UNAUTHORIZED error. My successful cURL: $ curl https://domain.agilecrm.com/dev/api/contacts/search/email \ -H "Accept: application/json" \ -d 'email_ids=["contact@test.com"]' \ -u admin@test.com:api_key which returns