From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

POSTMultipart error

Solved!
Go to solution

I am using the LabVIEW HTTP client vi's to access a server.

 

I have used the GET to access info from the server successfully.

 

I have been unsuccessful sending to the server using POSTMultipart.

 

I does not even appear to do anything and throws the error: 363511 An error occurred while reading from the socket.

 

Since the POSTMultipart is passworded, I can't really trace into it to see if there are any clues there...

 

I attempted to see what is actually transmitted by capturing the exchange with wireshark, but the data is encrypted by the time it hits the wire, so I can't really see the content of the packets.

 

Basically it's trying to send a csv file to the server and the data terminal on the POSTMultipart has the file name and some instructions to the server what to do with it.

 

 SendSnippet.png

 

Since the vi's I wrote with GET seem to work, my first guess would be something wrong in the format of the array of clusters connected to the data terminal. But, the dev for the server doesn't see any communication from this client. (He can see the comm from my GET clients though.)

 

Any ideas, pointers, questions appreciated.

 

Thanks,

Mac

0 Kudos
Message 1 of 5
(4,073 Views)
1) I think the Post multipart VI includes the multipart/form-data header, so you don't need to add it yourself.
2) What is happening inside the SubVI that prepares the data to POST - can you upload/include a snippet of that VI?

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(4,064 Views)

This builds the post data:

 

BuildSnippet.png

0 Kudos
Message 3 of 5
(4,043 Views)
Solution
Accepted by topic author MacDroid

The split path VI removes the filename from the path - so the file path you're sending is actually just the path to the directory - wire the path from before the split path into the cluster. 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(4,039 Views)

Looks like that was it. I'll need to run some more tests...but, now the server is having issues and that I have no control over.

 

Thanks!

0 Kudos
Message 5 of 5
(4,027 Views)