{"action":"created","issue":{"url":"https://api.github.com/repos/Valandur/Web-API/issues/64","repository_url":"https://api.github.com/repos/Valandur/Web-API","labels_url":"https://api.github.com/repos/Valandur/Web-API/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/Valandur/Web-API/issues/64/comments","events_url":"https://api.github.com/repos/Valandur/Web-API/issues/64/events","html_url":"https://github.com/Valandur/Web-API/issues/64","id":305250396,"number":64,"title":"Can't POST Request to API Server Plugin","user":{"login":"pdglobal","id":36902779,"avatar_url":"https://avatars3.githubusercontent.com/u/36902779?v=4","gravatar_id":"","url":"https://api.github.com/users/pdglobal","html_url":"https://github.com/pdglobal","followers_url":"https://api.github.com/users/pdglobal/followers","following_url":"https://api.github.com/users/pdglobal/following{/other_user}","gists_url":"https://api.github.com/users/pdglobal/gists{/gist_id}","starred_url":"https://api.github.com/users/pdglobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdglobal/subscriptions","organizations_url":"https://api.github.com/users/pdglobal/orgs","repos_url":"https://api.github.com/users/pdglobal/repos","events_url":"https://api.github.com/users/pdglobal/events{/privacy}","received_events_url":"https://api.github.com/users/pdglobal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-14T17:10:30Z","updated_at":"2018-03-15T23:05:01Z","closed_at":null,"author_association":"NONE","body":"Please help, I am trying to send a POST request to the API to execute the command:\r\n\r\n\"broadcast test message\"\r\n\r\nSee my simple php code below, It's authenticating but returning the following error:\r\n\r\n> {\"code\":400,\"message\":\"Invalid command data: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token\\n at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: valandur.webapi.serialize.request.command.ExecuteCommandRequest[\\\"command\\\"])\"}\r\n\r\nCode:\r\n```\r\n<?PHP\r\n_postdata('http://127.0.0.1:8080/api/cmd', array(\"command\" => \"broadcast test message\"), array('x-webapi-key: HIDDEN))\r\nfunction _postdata($url, $data, $header) {\r\n    $curl = curl_init($url);\r\n\tcurl_setopt($curl,CURLOPT_HTTPHEADER, $header);\r\n    curl_setopt($curl, CURLOPT_POST, true);\r\n    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\r\n    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n    $response = curl_exec($curl);\r\n    curl_close($curl);\r\n    return $data.'=>'.$response;\r\n}\r\n?>\r\n```\r\n\r\nPlease help, it would only take a moment of your time and would help me greatly."},"comment":{"url":"https://api.github.com/repos/Valandur/Web-API/issues/comments/373550574","html_url":"https://github.com/Valandur/Web-API/issues/64#issuecomment-373550574","issue_url":"https://api.github.com/repos/Valandur/Web-API/issues/64","id":373550574,"user":{"login":"pdglobal","id":36902779,"avatar_url":"https://avatars3.githubusercontent.com/u/36902779?v=4","gravatar_id":"","url":"https://api.github.com/users/pdglobal","html_url":"https://github.com/pdglobal","followers_url":"https://api.github.com/users/pdglobal/followers","following_url":"https://api.github.com/users/pdglobal/following{/other_user}","gists_url":"https://api.github.com/users/pdglobal/gists{/gist_id}","starred_url":"https://api.github.com/users/pdglobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdglobal/subscriptions","organizations_url":"https://api.github.com/users/pdglobal/orgs","repos_url":"https://api.github.com/users/pdglobal/repos","events_url":"https://api.github.com/users/pdglobal/events{/privacy}","received_events_url":"https://api.github.com/users/pdglobal/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T23:05:01Z","updated_at":"2018-03-15T23:05:01Z","author_association":"NONE","body":"Thanks so much my man! I'll make sure to ask for help in the forums or discord from now on, just wasn't sure where to go for help. Also, is there a feature in webapi to send a message to the whole server without having to call the broadcast command?(so that [broadcast] doesnt't show up in front of the message) If not, could I kindly request you add this functionality? It would be super useful for a variety of reasons."}}
{"actor":{"display_login":"pdglobal"}}