Hello
Whenever I try to communicate with the server it return the response as below which is clearly an error:
Below is my VBA code
I do not believe that the code has anything to do with this , any idea here? I have run out of ideas now
Whenever I try to communicate with the server it return the response as below which is clearly an error:
Code:
{"timestamp":"2024-02-03T14:23:38.333+00:00","status":404,"error":"Not Found","path":"/nector/"}
Below is my VBA code
Code:
Private Sub CmdInitializer_Click()
Dim n As Integer
Dim Request As Object
Dim stUrl As String
Dim Response As String
Dim requestBody As String
stUrl = "http://localhost:8080/nectorserverdf/"
Set Request = CreateObject("MSXML2.XMLHTTP")
requestBody = "{ ""Tax Pin"": ""1002623668"", " & _
"""BranchID"": ""012300"", " & _
"""fvcSrLno"": ""nec60000005""}"
With Request
.Open "POST", stUrl, False
.setRequestHeader "Content-type", "application/json"
.send requestBody
Response = .responsetext
End With
If Request.Status <> 200 Then
MsgBox Request.responsetext, vbCritical, "Internal Audit Manager"
n = FreeFile()
Open "C:\Users\necto\Desktop\Testing\test.txt" For Output As #n
Print #n, Request.responsetext
Close #n
Exit Sub
End If
End Sub
I do not believe that the code has anything to do with this , any idea here? I have run out of ideas now