Filemaker Connection Help!

Hello everyone,
I am trying to write an app to connect with filemaker.
The problem that i am having is with URLConnection.
The cURL code to connect to the DB is:
curl --location --request POST ‘https://address/fmi/data/vLatest/databases/Test%20Xojo/sessions
–header ‘Content-Type: application/json’
–header ‘Authorization: Basic username/passHash’

The way i translate it to URLConnection is this:
WebConnection.SetRequestContent( “{}”,“application/json”)
WebConnection.SetRequestContent("",“Authorization: Basic username/passHash”)
WebConnection.Send(“POST”, “https://address/fmi/data/vLatest/databases/Test%20Xojo/sessions”)

The FM database responds but give me error. I tried other permutations but the same.
Am i doing it wrong?
Thanks in advance for any guidance

Did you see our posting about the new classes to connect?

May help you as the plugin does most of the work for you.

You know your plugin is wonderful, the thing is that this project is a proof of concept to see what we can do with xojo. It is also training for me. When we get a project the company will probably buy it because it has everything. For the time being i need to find a solution to understand a little better how this thing works.
Thank you for responding

That needs to go in the header, not the body.

And I would be happy if you could try the plugin in parallel. It’s brand new and needs some testing. You can request a trial key for free on our website.

Thanks for the solution. Worked like a charm. I will talk to my boss about a trial key for your plugin

1 Like