0

I have a simple post method that I am calling from VSCode Thunder Client. The call successfully hits the api, however the body parameter 'criteria' is empty, that is it does not containg the content specified in the body element of the call from the Thunder Client. This the POST method in the API:

      ''' <summary>
      ''' Post request to return all events meeting the specified SCADA Criteria
      ''' The parameter 'criteria' accepts complex criteria conforming to the SCADA
      ''' REST API requirements
      ''' </summary>
      ''' <param name="criteria"></param>
      ''' <returns></returns>
      <Route("api/digitalevents/general")>
      <HttpPost>
      Public Function General(<FromBody> ByVal criteria As String) As bo.ScadaEventList
                Dim events As bo.ScadaEventList = New bo.ScadaEventList
                Dim scadaInterface As New SCADAInterface()
                events = scadaInterface.GeneralQuery(criteria)
                Return events
      End Function

Very likely I am missing something fundamental from my approach. Hope there is someone out there who can enlighten me :-)

Kind Regards Paul J.

Paul Johnson
  • 193
  • 1
  • 11
  • Having experienced the same sounding problems using postman, you might find the problem is in fact how the request is being sent from thunder client that is actually the issue rather than the server end. Check the parameters are actually being sent in the correct format, correct request headers etc – Hursey Jan 21 '22 at 23:14

0 Answers0