Jump to content

HTTP GET with Base Elements


naio

This topic is 1723 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm trying to integrate my FM solution with Freshdesk, a helpdesk web app that uses GET and PUT commands over HTTP. My first challenge is to retrieve a ticket from Freshdesk. According to the API documentation, all I need to do is (for ticket ID 200):

curl -v -u [email protected]:test -H "Content-Type: application/json" -X GET 'https://domain.freshdesk.com/api/v2/tickets/200'

I'm happy I made it work in Mac OS Terminal! but now I would like to use it within FM and the Base Elements plugin seems a good option, so I made the following script:

Set Variable [ $header; Value: BE_HTTP_Set_Custom_Header ( "Content-Type" ; "application/json" ) ]
Set Variable [ $get; Value: BE_HTTP_GET ( "https://domain.freshdesk.com/api/v2/tickets/200"; "[email protected]"; "test" ) ]

I expect to get the json data into the $get variable but I just get [email protected] in it.

The documentation for BE plug-in is not for newbies like me and there's something I don't do right. Can you help me with this or at least point me to a place where I can learn a little about it?

Thanks,

Link to comment
Share on other sites

  • 2 years later...

Unless you are working with an old version of FM (pre 16) you don't need the BaseElements plugin to make GET calls, you'd use the "Insert from URL" script step with its cURL options.  So show us where you are stuck and we can see if we can help out.

Link to comment
Share on other sites

This topic is 1723 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.