REQUESTHTTPX ssue

There still seems to be an issue with REQUESTHTTPX where the parameters for the header and file cannot be used together.

This was noted in the following post a year ago Influx with RequestHttpx. Wondering when this is going to be fixed or is it ever going to be??

I am trying to move a file from the Flexy unit to Azure Blob storage using a PUT method with the REQUESTHTTX statement. I have the statement working in Postman and the file is uploaded as expected.

Using basic script the command does not upload the file even though it says it completed.

Using a temp bin on the RequestBin web site I can see the REQUESTHTTX statement working only when either the headers are used or the file upload is used as a parameter not both at the same time.

Hello Ted,

Let me escalate this issue and ask our development team on the status of this bug.

Hello Ted,

This is the update that i received regarding the HTTPX issue.

Nothing has been changed since then.

I have tested this again and I think this behavior makes sense.
Indeed, according to my test, the only header you cannot set when sending a file is the content-type. The other header works.
Indeed, the content-type is forced to
Content-Type: application/x-www-form-urlencoded
When you send a file.
So if you try to hardcode it on your own, it cannot send the file.

I am trying to send a text file from the unit to Blob storage on Azure. There is an existing text file in the Blob storage that is going to be replaced with the data from the unit. The file in Azure has data until the code below runs. Then the file has nothing after this runs.

Below is the code that sort of works. It says a 201 response but the file is empty after this runs.

url$=“https://nameofaccount.blob.core.windows.net/unit-archive/nameofuinthere/Tics.txt?sv=2019-12-12&si=secretstuff&sr=c&sig=removedsecretstuffsoyoudontknowit

header$= “x-ms-blob-type=BlockBlob&Content-Type=application/x-www-form-urlencoded&Content-Length=0”

body$=""

method$=“PUT”

REQUESTHTTPX url$, method$,header$, “”,“file=[$dtUF $uf/usr/Tics.txt $fnTics.txt]”

actionID% = GETSYS PRG,“ACTIONID”

PRINT "request actionid is "; actionID%

ONSTATUS “GOTO onEvent”

Based on the response about the content type header I have tried different headers and the one listed above is the only one that returns a 201. IF you do not specify the Content-Type there is a 400 error.

Sending a file to Azure Blob storage is something that we can do using Postman and the headers listed above.

image001.jpg

image002.jpg

bump

Hello ted,

I have updated my escalation, and I am waiting for a response.

This is the response that I have recieved

Have you tried without the content-length=0 header ?

Have you tried with

url$=“https://nameofaccount.blob.core.windows.net/unit-archive/nameofuinthere/Tics.txt

header$= “x-ms-blob-type=BlockBlob"

body$="sv=2019-12-12&si=secretstuff&sr=c&sig=removedsecretstuffsoyoudontknowit

method$=“PUT”

REQUESTHTTPX url$, method$,header$, body$,“file=[$dtUF $uf/usr/Tics.txt $fnTics.txt]”

actionID% = GETSYS PRG,“ACTIONID”

PRINT "request actionid is "; actionID%

ONSTATUS “GOTO onEvent”

?

Tried that and received the message.

Missing content length header.

Rearranged some of the code and was able to send it with the following but the destination shows up as 0 bits. Nothing in the file.

url$=“https://nameofaccount.blob.core.windows.net/unit-archive/nameofunitthere/Tics.txt?sv=2019-12-12&si=secretstuffin-here

header$= “Content-Type=application/x-www-form-urlencoded&x-ms-blob-type=BlockBlob”

body$=""

method$=“PUT”

REQUESTHTTPX url$, method$,header$, body$,“file=[$dtUF $uf/usr/Tics.txt $fnTics.txt]”

actionID% = GETSYS PRG,“ACTIONID”

PRINT "request actionid is "; actionID%

ONSTATUS “GOTO onEvent”

image001.jpg

image002.jpg

bump

any update?

Hello Ted,

My apologies. I reached out to Sweden about an update. They haven’t been able to replicate the issue.

They did reply with the following:

I would have to try it by myself to check that.

Can they provide me an access to their blob space pn Azure ?

If you can provide access, we can take a look at your code.

It has been sent to the other email.

image010.jpg

image011.jpg

Excellent.

Thank you Ted. I will forward it to our team.

Hello Ted,

I am waiting an update from Simon. I will ping him again for an update.

Hello Ted,

This is the response i got from Simon.

I have investigated that until now and I have created some BASIC functions to push EBD data or usr files to Azure Storage : https://techforum.ewon.biz/thread-1638.html

The limitation I have found out is that the binary data cannot be sent (such as images). Only Text data can be sent (txt, csv, html,…)

Indeed the problem is that the REQUESTHTTPX stops sending data when it faces a 0x00 in the file (End of string in Plain C language…)

I have reported this problem to the R&D but I do not hope to get a fix short or mid term…

This is where we stand regarding the limitations