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

Re: cURL - FTPAPI



   Thanks Sean. I thought the -F parameter was being used to send the
   name pair "stream.file=c:/Temp/data/myfile.xml" to the server as input
   to the update operation. hmmm...If I don't specify the file name, SOLR
   won't know what file it's supposed to use.

   On Wed, Dec 15, 2010 at 9:44 AM, Porterfield, Sean
   <[1]SPorterfield@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

     The curl -F option means it's going to send that file to the
     server.  You don't want to include that file in the URI for
     HTTPAPI.  If it really contains information to send to the server,
     you need to send it.  Otherwise, do the GET without the "-F
     stream.file=c:/Temp/data/myfile.xml"
     --
     Sean Porterfield

   -----Original Message-----
   From: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Michael
   Ryan
   Sent: Wednesday, December 15, 2010 09:39
   To: HTTPAPI and FTPAPI Projects
   Subject: Re: cURL - FTPAPI
   Well...I find this odd. I changed this to a GET, like this:
    rc = http_url_get('[4]http://server.example.com:8090/solr/update +
                              -F stream.file=c:/Temp/data/myfile.xml' :
                              '/tmp/newfile.xml');
   And I get the same 505 error. What is cURL doing that an HTTPAPI GET
   isn't doing? Doesn't cURL implement things like POSTs and GETs and
   file transfers and stuff like that? Nothing is returned in
   /tmp/newfile.xml; I'm getting the return code from the rc variable.
   I'd rather not implement cURL on the iSeries if I don't have to.
   Thanks...
   On Wed, Dec 15, 2010 at 9:11 AM, Michael Ryan
   <[5]michaelrtr@xxxxxxxxx> wrote:
   > Hi Scott -
   >
   > Thanks for the reply. This is for a SOLR server, which is a search
   > engine application that runs on a Windows box. The update process
   will
   > update the search engine data base.
   >
   >  I don't want HTTPAPI to call cURL; I want to use HTTPAPI to do what
   > cURL does. So I probably want to do a GET instead of a POST, right?
   > I'll give that a go.
   >
   > Thanks!
   >
   > On Tue, Dec 14, 2010 at 2:05 PM, Scott Klement
   <[6]sk@xxxxxxxxxxxxxxxx>wrote:
   >
   >> Hi Michael,
   >>
   >> Are you sure this is a valid URI?  It looks more like a Unix
   >> command-line.  The HTTP protocol does not automatically let you run
   >> remote commands on another server. (Though, a program could be
   >> written that takes the URI, extracts the command from it, and runs
   >> it.)
   >>
   >> Normally, cURL does the same thing that HTTPAPI does... so it seems
   >> strange for HTTPAPI to ask cURL to do something?
   >>
   >> Can you provide more detail on how this web site is supposed to
   work,
   >> and what it's supposed to do?
   >>
   >> You also said "there's not much in Data because I don't want to
   post
   >> anything".  That's a strange thing to say.  Why are you using POST
   if
   >> you don't have anything to POST?  Why not use GET?
   >>
   >>
   >>
   >> On 12/14/2010 8:26 AM, Michael Ryan wrote:
   >> >
   >> >     I want to do this cURL call:
   >> >
   >> >     curl [1][7]http://server.example.com:8090/solr/update -F
   >> >     stream.file=c:/Temp/data/myfile.xml
   >> >
   >> >     using HTTPAPI. I've tried an http_url_post like this:
   >> >
   >> >     retlen = http_url_post(
   >> >            '[2][8]http://server.example.com:8090/solr/update +
   >> >              -F stream.file=c:/Temp/data/myfile.xml'
   >> >                            : %Addr(Data)
   >> >                            : %Len(%TrimR(Data))
   >> >                            : '/tmp/newfile.xml');
   >> >
   >> >     and got back a 505 - not supported.
   >> >
   >> >     There's not much in Data cause I really don't want to post
   >> > anything;
   >> I
   >> >     just want to run the update process with the file
   (myfile.xml)
   >> >     specified.
   >> >
   >> >     Any ideas?
   >> >
   >> >     Thanks!

     This email is confidential, intended only for the named
     recipient(s) above and may contain information that is privileged.
      If you have received this message in error or are not the named
     recipient(s), please notify the sender immediately and delete this
     email message from your computer as any and all unauthorized
     distribution or use of this message is strictly prohibited.  Thank
     you.

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

References

   1. mailto:SPorterfield@xxxxxxxxxxxxxxxxxxxxxxx
   2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. http://server.example.com:8090/solr/update
   5. mailto:michaelrtr@xxxxxxxxx
   6. mailto:sk@xxxxxxxxxxxxxxxx
   7. http://server.example.com:8090/solr/update
   8. http://server.example.com:8090/solr/update
   9. 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
-----------------------------------------------------------------------