Private Sub Command15_Click() Dim http As Object Dim url As String Dim body As String Dim response As String ' Definisite URL url = "http://192.168.1.21:3566/api/invoices" ' Kreirajte XMLHTTP objekat Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0") ' Definisite tijelo zahtjeva kao JSON string sa svim parametrima body = "{""print"": true, ""renderReceiptImage"": true, ""receiptLayout"": ""Slip"", ""receiptImageFormat"": ""Png"", ""receiptSlipWidth"": 386, ""receiptSlipFontSizeNormal"": 23, ""receiptSlipFontSizeLarge"": 27, ""invoiceRequest"": {""invoiceType"": ""Training"", ""transactionType"": ""Sale"", ""payment"": [{""amount"": 1.00, ""paymentType"": ""0""}], ""items"": [{""name"": ""Test"", ""labels"": [""\u0415""], ""totalAmount"": 1.00, ""unitPrice"": 0.50, ""quantity"": 2.000}], ""cashier"": ""Prodavac 1""}}" ' Otvorite HTTP konekciju http.Open "POST", url, False ' Dodajte zaglavlja http.setRequestHeader "Authorization", "Bearer 03dbf5a104b4c4d0ed2b298eb7886255" http.setRequestHeader "RequestId", "12385" http.setRequestHeader "Content-Type", "application/json" ' Posaljite zahtjev http.send body ' Dobijte odgovor response = http.responseText ' Prikazite odgovor MsgBox response Debug.Print response ' Oslobodite resurse Set http = Nothing End Sub