Skip to main content

We want to receive files over a REST-API in a USP from a other API.
We connect both, but we had the Status -1 (Cannot open the specified file) into DUMP_FILE_CONTENTS.

We had already a Download-url and a raw-body in this request.

This is the code:

newinstance "UHTTP",hv_UHTTP
hv_UHTTP→SET_FLAGS(16)
hv_UHTTP->DUMP_FILE_CONTENTS(sv_LOCAL_FILE_NAME, "")
hv_UHTTP→SEND(sv_DOC_FIL_NAM,"GET","","",sv_HEADERS,"",sv_RESPONSE)
if ($status == 200)
hv_UHTTP→DUMP_FILE_CONTENTS("","")
endif


Is there any possibility to get more information what happend?

We want to receive files over a REST-API in a USP from a other API.
We connect both, but we had the Status -1 (Cannot open the specified file) into DUMP_FILE_CONTENTS.

We had already a Download-url and a raw-body in this request.

This is the code:

newinstance "UHTTP",hv_UHTTP
hv_UHTTP→SET_FLAGS(16)
hv_UHTTP->DUMP_FILE_CONTENTS(sv_LOCAL_FILE_NAME, "")
hv_UHTTP→SEND(sv_DOC_FIL_NAM,"GET","","",sv_HEADERS,"",sv_RESPONSE)
if ($status == 200)
hv_UHTTP→DUMP_FILE_CONTENTS("","")
endif


Is there any possibility to get more information what happend?

Hi Dirk

You are in this forum, no Daniel K. around  🙂
To check what's going on, use
 $ioprint=4095
 procmon  (https://docs.microsoft.com/de-de/sysinternals/downloads/sysinternals-suite)
 wireshark (https://www.wireshark.org/)
This should give you some hint to the problem.

Greetings from Mainz
Ingo




Hi Dirk

You are in this forum, no Daniel K. around  🙂
To check what's going on, use
 $ioprint=4095
 procmon  (https://docs.microsoft.com/de-de/sysinternals/downloads/sysinternals-suite)
 wireshark (https://www.wireshark.org/)
This should give you some hint to the problem.

Greetings from Mainz
Ingo



Hi Ingo,

Daniel is deep into other development and far away … why Homeoffice.

Thx for your help.

I can only use the ioprint to check it.

Greetings from the other side of the river (Wiesbaden)

Dirk


We want to receive files over a REST-API in a USP from a other API.
We connect both, but we had the Status -1 (Cannot open the specified file) into DUMP_FILE_CONTENTS.

We had already a Download-url and a raw-body in this request.

This is the code:

newinstance "UHTTP",hv_UHTTP
hv_UHTTP→SET_FLAGS(16)
hv_UHTTP->DUMP_FILE_CONTENTS(sv_LOCAL_FILE_NAME, "")
hv_UHTTP→SEND(sv_DOC_FIL_NAM,"GET","","",sv_HEADERS,"",sv_RESPONSE)
if ($status == 200)
hv_UHTTP→DUMP_FILE_CONTENTS("","")
endif


Is there any possibility to get more information what happend?

Hi Dirk,


try some unocumented Feature:


[SETTINGS]
$trc_start uhttp.trc 
$trc_levels 9U


I got this some years ago from Daniel Iseli.


Greetings from Flörsheim am Main

Norbert


Hi Dirk,


try some unocumented Feature:


[SETTINGS]
$trc_start uhttp.trc 
$trc_levels 9U


I got this some years ago from Daniel Iseli.


Greetings from Flörsheim am Main

Norbert

An explanation
$trc_start=<filename>     ; Starts tracing, output is <filename>
$trc_start=<level_what>  ; What should be traced at which level
$trace_info=all                 ; Some additional info

<level_what> := <level_what2>(<level_what2>)*  ;  List of "level_what"
<level_what2> := <level><what2>(<what2>)*     ;  List of "what"
<what2> = <what>|<what>"-"+<what>             ;  Single or range "what"

<level> = "0".."9"              ; a level: 0=not, 9 is hightest
<what> = "A".."Z"|"a".".z"   ; what to trace, the exact meaning is unknown to me 🙂
                                         ; Possible "U" stands for "UHTTP" ?

To trace all you can set:
$trace_info=all
$trc_levels=9A-Za-z
$trc_start=C:\\temp\\trace_output.log

Ingo