jrel Posted October 15, 2021 Posted October 15, 2021 Hey, as this cost me more time than it should, i wanna share a non-php API client example as a postman collection. I am totally not sure why php is such a mess in using real headers ... froxlor.postman_collection.json { "info": { "_postman_id": "1412c04b-e0ed-4252-9df8-b560d725b9a6", "name": "froxlor", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Froxlor", "item": [ { "name": "listFunctions", "protocolProfileBehavior": { "strictSSL": false, "followOriginalHttpMethod": false, "followAuthorizationHeader": false, "followRedirects": false, "disabledSystemHeaders": {} }, "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"header\": {\n \"apikey\": \"{{apikey}}\",\n \"secret\": \"{{secret}}\"\n \n },\n \"body\": {\n \"command\": \"Froxlor.listFunctions\",\n \"params\":[]\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{domain}}/api.php", "protocol": "https", "host": [ "{{domain}}" ], "path": [ "api.php" ] } }, "response": [] } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "apikey", "value": "" }, { "key": "secret", "value": "" }, { "key": "domain", "value": "" } ] }
0 d00p Posted October 15, 2021 Posted October 15, 2021 15 minutes ago, jrel said: I am totally not sure why php is such a mess in using real headers ... real headers are not required for froxlor api...it's all in the request itself
0 jrel Posted October 15, 2021 Author Posted October 15, 2021 vor 16 Minuten schrieb d00p: real headers are not required for froxlor api...it's all in the request itself now I know maybe this helps some others 1
0 Copprhead Posted April 24, 2023 Posted April 24, 2023 Thank you jrel, this helped me a lot! It would be nice if the documentation would contain an example like yours.
0 d00p Posted April 24, 2023 Posted April 24, 2023 1 minute ago, Copprhead said: Thank you jrel, this helped me a lot! It would be nice if the documentation would contain an example like yours. https://docs.froxlor.org/latest/api-guide#_2-request-structure-layout
Question
jrel
Hey,
as this cost me more time than it should, i wanna share a non-php API client example as a postman collection.
I am totally not sure why php is such a mess in using real headers ...
froxlor.postman_collection.json
{ "info": { "_postman_id": "1412c04b-e0ed-4252-9df8-b560d725b9a6", "name": "froxlor", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Froxlor", "item": [ { "name": "listFunctions", "protocolProfileBehavior": { "strictSSL": false, "followOriginalHttpMethod": false, "followAuthorizationHeader": false, "followRedirects": false, "disabledSystemHeaders": {} }, "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"header\": {\n \"apikey\": \"{{apikey}}\",\n \"secret\": \"{{secret}}\"\n \n },\n \"body\": {\n \"command\": \"Froxlor.listFunctions\",\n \"params\":[]\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{domain}}/api.php", "protocol": "https", "host": [ "{{domain}}" ], "path": [ "api.php" ] } }, "response": [] } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "apikey", "value": "" }, { "key": "secret", "value": "" }, { "key": "domain", "value": "" } ] }
4 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now