Jump to content
Froxlor Forum

jrel

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by jrel

  1. 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": ""
    		}
    	]
    }

     

×
×
  • Create New...