How to post .txt file using http

I’m trying to post a flat file (.txt) file that’s stored on my HDD to a specified URL. How this possible via http service.

I appreciate your reply.

Thanks

Raj

I assume you’re trying to post from IS to another web server via HTTP. Did you attempt to figure out for yourself how to do this before posting?

If IS is running on your machine, then you’ll be able to post the flat file that is on your HDD. If IS is running somewhere else, you’ll need to make that flat-file available to the IS machine by sharing your director to the network or moving the file to a directory that the IS machine has access to.

  • Load the file using getFile.
  • Invoke http, passing the bytes retrieved by getFile. Set the various http inputs as needed. Set the content-type to text/plain.

If you haven’t read the wM docs, you’ll want to do so. If you have any specific questions, feel free to post them.

Hi ,

Flat-File is available to IS , Here I am trying post file to web server Via HTTP , where on web server they have upload system which will take the filename and upload to thier Directory (wer server).

So I need to pass file name and content part to their server, passing content is done by set content-type to text/plian.

My quetion is how to pass file name and content to HTTP SERVICE.

Yes , I read WM doc’s and I tried gerfile service to getthe file into IS .

I appreciate your reply.

Thanks,
Raj

"…web server they have upload system which will take the filename and upload to thier Directory (wer server).

So I need to pass file name and content part to their server, passing content is done by set content-type to text/plian."

These two statements seem to contradict each other. In one you say the web server accepts a filename and it will go get the file. In the other you state that you need to send the content.

In either case, it may be helpful to get information from the web server folks on how they need you to post the data to their server.

Hi Rob ,

web server Expecting File name . Not content part…

Sorry for confusion .

This seems unusual, though not out of the question. This means that the web server must have network access to the file. Will that be the case? If so, you can probably do a “get” operation and pass data/args to pass the filename using the variable name that the web server expects.

Again, you probably need to get additional info from the web server people to ensure you’re posting things the right way.

A part of me is thinking you may be trying to leverage a file input facility that is supported by browsers using the “file” input field type. Is that the case? If so, then you’ve got a bit more work to do, such as creating a multipart/form-data document to be submitted.

Hi Rob ,

I appreciate your replys and thanks a lot for help.

Raj