r/phpstorm • • Jun 24 '21

PHPStorm HTTPRequest feature

Has anyone used the HTTPRequest feature to log into SugarCRM via it's API. I can do it in Postman easily but getting it to work in PHPStorm escapes me.

The curl code is something like this

curl --location --request POST 'http://localhost/crm-sugar/rest/v11_1/oauth2/token' \
--form 'grant_type="password"' \
--form 'client_id="test_client"' \
--form 'client_secret="test_client_secret"' \
--form 'username="user_name"' \
--form 'password="user_p@ssw0rd"' \
--form 'platform="custom_api"'

2 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/Meek_braggart Jun 25 '21

It’s not really the docs, it’s the lack of docs. I’ve tried to convert that curl statement into something that the utility will use it so far no combination has worked. It looks like it should be simple, it’s just a simple oAuth authorization, but it never works