[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Question Regarding http_url_post_stmf



Thanks, I'll try to get more information about what is expected from the web
site.

I just now posted this same question on IsystemsNetwork, before I saw your
response.  Oops.

Thanks again.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, October 20, 2011 10:30 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Question Regarding http_url_post_stmf

Hi Patricia,

>
>     I hope I'm asking this in the right place.
>

Yep, this is the place!


>
> I'm new to this, and am trying to receive from a web page some XML
> data.  I am able to get it working, but I think I'm missing some
> concept about the purpose of the stream file.  In my mind, I want to
> use the stream file to pass variables, entered by an operator.
>

You have to do what the web site expects you to do.  If the web site is 
expecting the data to come in the form of a file upload, then you have 
to send it as a file upload.  If the web site is expecting the data to 
come in the URL, then you have to send it in the URL.

If you send your data in a file, but the web site is looking for the 
data in the URL, then it won't work. Likewise, if you send your data in 
the URL when the web site is looking for it in a file, it won't work.

Your program and the web site must "agree" on the way to pass data. 
Assuming this is an established site (that's what it sounds like) you'll 
probably want to code your RPG to work the way the site already works.


>
>     I will take the advice of Mr. Klement and change this to use
>     http_url_post_stmf once I get this whole stmf thing working.
>

Wow, you know my Dad..?

If you want my advice:  HTTPAPI is full of different routines.  Or, 
let's call them "tools."   Use the right "tool" for the job. 
http_url_post_stmf() is great for what it does -- it POSTs a stream file 
to an HTTP server.  If your HTTP server wants to receive a file in a 
POST request, it's probably the right tool for the job.

If not, use a different routine.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------