Switch to desktop version  
RequestHttpx Error code 32601 - Printable Version

+- Ewon Technical Forum (https://techforum.ewon.biz)
+-- Forum: Development (https://techforum.ewon.biz/forum-50.html)
+--- Forum: BASIC Script (https://techforum.ewon.biz/forum-52.html)
+--- Thread: RequestHttpx Error code 32601 (/thread-2800.html)



RequestHttpx Error code 32601 - tboven - 25-11-2025

Hi,

I am trying to call an API using the REQUESTHTTPX function (see code below).
After running it gives the following error: 32601 (http connect error).
When using the OPEN function to ping the IP it also fails.
If i connect my laptop to the WAN network of the EWON i can reach the API from my laptop.

I am using a EWON flexy 205 with firmware version 15.0s2

I am able to reach the example.com API from the ewon.
When trying to reach 'https://api.sampleapis.com/wines/reds' (random example API i was able to find and i can reach from my laptop) i get error code 32603.

What causes these error codes?

Code:
Rem --- eWON start section: Init Section
eWON_init_section:
Rem --- eWON user (start)
ONSTATUS "GOTO onEvent"
ONTIMER 1,"GOTO request"
TSET 1,300

request:
  REQUESTHTTPX "https://***************.com:44300/sap/opu/odata/sap/API_PROD_ORDER_CONFIRMATION_2_SRV/ProdnOrdConf2","GET","x-csrf-token=fetch&Authorization=Basic *****************"
  actionID% = GETSYS PRG, "ACTIONID"
  PRINT "request action id is "; actionID%
END

onEvent:
eventId% = GETSYS PRG, "EVTINFO"
  PRINT "event id is "; eventId%

  IF (eventId% = actionID%) THEN
    SETSYS PRG, "ACTIONID", eventId%
    status% = GETSYS PRG, "ACTIONSTAT"
    Print "Status:" status%
      IF (status% = 0) THEN
          a$ = RESPONSEHTTPX "STATUSCODE"
          PRINT "statuscode: "; a$
          a$ = RESPONSEHTTPX "RESPONSE-BODY"
          PRINT "'response-body: "; a$
      ENDIF     
  ENDIF
END


Rem --- eWON user (end)
End
Rem --- eWON end section: Init Section



RE: RequestHttpx Error code 32601 - mickaa - 26-11-2025

(25-11-2025, 07:27 PM)tboven Wrote: Hi,

I am trying to call an API using the REQUESTHTTPX function (see code below).
After running it gives the following error: 32601 (http connect error).
When using the OPEN function to ping the IP it also fails.
If i connect my laptop to the WAN network of the EWON i can reach the API from my laptop.

I am using a EWON flexy 205 with firmware version 15.0s2

I am able to reach the example.com API from the ewon.
When trying to reach 'https://api.sampleapis.com/wines/reds' (random example API i was able to find and i can reach from my laptop) i get error code 32603.

What causes these error codes?

Code:
Rem --- eWON start section: Init Section
eWON_init_section:
Rem --- eWON user (start)
ONSTATUS "GOTO onEvent"
ONTIMER 1,"GOTO request"
TSET 1,300

request:
  REQUESTHTTPX "https://***************.com:44300/sap/opu/odata/sap/API_PROD_ORDER_CONFIRMATION_2_SRV/ProdnOrdConf2","GET","x-csrf-token=fetch&Authorization=Basic *****************"
  actionID% = GETSYS PRG, "ACTIONID"
  PRINT "request action id is "; actionID%
END

onEvent:
eventId% = GETSYS PRG, "EVTINFO"
  PRINT "event id is "; eventId%

  IF (eventId% = actionID%) THEN
    SETSYS PRG, "ACTIONID", eventId%
    status% = GETSYS PRG, "ACTIONSTAT"
    Print "Status:" status%
      IF (status% = 0) THEN
          a$ = RESPONSEHTTPX "STATUSCODE"
          PRINT "statuscode: "; a$
          a$ = RESPONSEHTTPX "RESPONSE-BODY"
          PRINT "'response-body: "; a$
      ENDIF    
  ENDIF
END


Rem --- eWON user (end)
End
Rem --- eWON end section: Init Section

I suggest this post to guide you on the default.:


https://techforum.ewon.biz/thread-1276-post-4389.html#pid4389