jBackend POST API KEY
-
AndyG
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 4
-
Thank you received: 0
-
-
-
-
9 years 10 months ago #3453
by AndyG
Hi
I'm writing a plug-in for jBackend that will take POST data.
It seems though, that api_key cannot be sent via POST. I have tried to send and receive data via POST, but it will not accept the api_key, so that is kind of a stopper.
Would you be able to check this works please? Perhaps I am doing something simple wrong.
I was writing my code based on
www.selfget.com/documentation/jbackend-joomla30/developers-guide.html and the "Hello World" plugin example.
It would be really good if the hello world example included a POST example.
Great extension by the way, thank you. I posted a review on the new JED last week to say so.
Thanks
Andy
I'm a programmer and web designer to Software Systems: Open For Business in Aberdeen UK. We do web dev, mostly with Joomla.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
9 years 10 months ago - 9 years 10 months ago #3454
by admin
Hi Andy,
the api_key is checked by the main jBackend component (in the request model) to grant access using:
// Check API key
$api_key = $app->input->getString('api_key');
To support both GET and POST It should be changed into:
// Check API key
$api_key = $app->input->request->getString('api_key');
Let me check this and I will release a fix and let you know...
Kind regards,
Luigi
Last edit: 9 years 10 months ago by admin.
The following user(s) said Thank You: AndyG
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
9 years 10 months ago #3463
by admin
I have checked and it works AS-IS also with post. If you still have problems let me know (you can send me an email at info(at)selfget.com) and I can help you to fix the issue.
Kind regards,
Luigi
The following user(s) said Thank You: AndyG
Please Log in or Create an account to join the conversation.
-
AndyG
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 4
-
Thank you received: 0
-
-
-
-
9 years 10 months ago #3467
by AndyG
Hi Luigi
Thanks for checking this out, great to know.
I had to switch projects for a day, and just back onto it this afternoon.
I created a PHP test script using CURL to simulate the App, and had it working with GET, but POST will be a better option I think. Initially, on Monday, I had issues with POST, but that may have been a bug in my test script.
Great to hear it works as-is, thank you, I'll switch my code to POST and continue testing and development.
Thanks for the great extension.
Andy
I'm a programmer and web designer to Software Systems: Open For Business in Aberdeen UK. We do web dev, mostly with Joomla.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
9 years 10 months ago #3471
by admin
Thanks to you for subscription and let me know if you need more help.
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
AndyG
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 4
-
Thank you received: 0
-
-
-
-
9 years 10 months ago #3500
by AndyG
Hi Luigi
Thanks for checking that for me. I'm just revisiting it and found I had a bug jBackend plug-in code.
It's working nicely now with post.
Thanks
Andy
I'm a programmer and web designer to Software Systems: Open For Business in Aberdeen UK. We do web dev, mostly with Joomla.
Please Log in or Create an account to join the conversation.
Time to create page: 0.159 seconds