everything is in the subject.
My config: FMS16 + FMP clients.
The only thing that jumps out at me is that the URL implies a REST web service but you're sending XML. REST more typically works with JSON, SOAP with XML.
But looking at the little documentation that is available without a sign-in, it does seem to expect and return only XML:
Doc Vidal API · GitBook
Also surprised that HTTP is used and not HTTPS. Postman may ignore SSL warnings but FM won't. So double-check to make sure you are not expected to use HTTPS.
For your cURL options: put the XML in a variable first and specify the variable, that gets you around any character escaping and other text string nonsense.
Insert from URL with curl options:
FileMaker Pro 16 Help
fmpdude wrote: To POST using INSERT FROM URL, you use the "httppost" syntax. Or, for secure connections, httpspost. Then, as long as your actual URL is OK and the service method you're calling is a POST, you should be OK.
To POST using INSERT FROM URL, you use the "httppost" syntax. Or, for secure connections, httpspost.
Then, as long as your actual URL is OK and the service method you're calling is a POST, you should be OK.
Note that is the deprecated way of doing things so to keep your code future-proof, use the cURL options to specify POST instead of specifying "HTTPPOST"
Thanks for your replies.
When I use Postman, I get the result expected.
I only have to specify an url and body
I never use the cURL library;
I have to specify a text/xml format AND my xml data.
My URL includes the User and password.
I configured the Insert URL like this but the problem is probably coming from my syntax:
Specify URL: "http://api.vidal.fr/rest/api/alerts/full/html?app_id=my_ID&app_key=My_Pswd"
Specify cURL options:
"--header \"Content-type: text/xml\"
--data-raw <?xml version=\"1.0\" encoding=\"utf-8\"?>
ScreenShots from Postman, where I get the expected result
Any idea to get it right?
Base Elements plugin. The native cURL options provide the user with a confusing “URL Transfer” dialog. It works but is confusing. Certainly wish there was a way to suppress this.
The MBS plug-in works well too.
This server is a serveur provided by Vidal as test, no https is needed and these data are not sensitive.
My "Working Server" will be secured with https.
I am agree with you.
it's not clear for me too, even with the documentation.
I expected to get first a token, but it doesn't.
The result I receive is this
and I would like to get the preview mode in a FM Webviewer. A full functional html page.
Does someone know if the syntax of the cURL options is correct?
"--header \"Content-type: text/xml\" --data-raw @$My_data"
The server return me syntax request error.
If it works in Postman, it should be replicated in FM, isn't it?
I prefer avoid plugin if possible and use native functions, unless there is no other solution.
Ben from Belgium
The correct cURL is:
"-H \"Content-Type: text/xml\"
Retrieving data ...