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

Re: Headers



Hello Mauricio,

I'm not sure that I understand why you want to set these headers.

1) the line with 'POST' is not a header, it's the HTTP method, and is automatically done by HTTPAPI when you choose a "post" routine.

2) The "host" header and "content-length" are required by the HTTP protocol, and are automatically supplied by HTTPAPI.

3) The "User Agent" is sent by HTTPAPI automatically, but of coruse, it identifies itself as HTTPAPI (not Apache-HttpClient). If you want to change the string that it says (to trick the HTTP server into thinking you're a different device) you can do so by passing the peUserAgent parameter to the HTTPAPI call.

4) The Content-Type header is set by the peContentType parameter you provide to HTTPAPI.

5) The SoapAction header is set by the peSoapAction parameter to HTTPAPI.

6) Connection: keep-alive is for compatibility with HTTP/1.0, and should not be required here. in HTTP/1.1 it's the default action! But if you want to provide it, you'd need to do so with an HTTP_POINT_ADDL_HEADER exit procedure.

7) The "Accept:" header is usually optional, and in this case you're telling to accept everything (which is the default) so it should not be needed. But, if you want to provide it, again, you'd need to use the HTTP_POINT_ADDL_HEADER exit procedure. (One procedure would handle both the connection: keep-alive and accept: */*)

I don't understand why you want to provide these headers -- if they make any difference, it would imply a bug in the HTTP server you are communicating with. Please explain further.


On 4/25/2013 1:50 PM, Mauricio Diaz-Lapham wrote:
Hi All,

How do I get the HTPPAPI to pass these headers?
POST /client_smart/api HTTP/1.1
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Host: 172.16.255.7:5001
Accept: */*
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8
SOAPAction: "/client_smart/api/get_client"
Content-Length: 398


It is causing a 500 internal error response.

Thanks all.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
Sent: Thursday, April 25, 2013 12:00 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ftpapi Digest, Vol 78, Issue 38

Send Ftpapi mailing list submissions to
	ftpapi@xxxxxxxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
	http://scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to
	ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx

You can reach the person managing the list at
	ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific than "Re: Contents of Ftpapi digest..."


Today's Topics:

    1. OAuth Authentication (Miguel Caraballo)
    2. Re: OAuth Authentication (Garry Taylor)
    3. Re: OAuth Authentication (Scott Klement)
    4. Re: OAuth Authentication (James H. H. Lampert)
    5. UPS soap shiprequest example (Craig Jacobsen)


----------------------------------------------------------------------

Message: 1
Date: Wed, 24 Apr 2013 06:43:23 -0700 (PDT)
From: Miguel Caraballo <miguel.caraballo@xxxxxxxxxxxxxx>
To: "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: OAuth Authentication
Message-ID:
	<1366811003.39845.YahooMailNeo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Hi All,

HTTPAPI is our tool of choice for processing data obtained via web services. We love this tool.
Until now we have been connecting to web services using basic authentication, without any problems.

However, I now need to connect to a RESTFul web service that requires OAuth authentication, which we have never done before. I would appreciate any help in pointing out the necessary steps to implement OAuth authentication when connecting to a RESTFul web service.

Thank you.
Miguel A. Caraballo
-------------- next part --------------
    Hi All,
    HTTPAPI is our tool of choice for processing data obtained via web
    services. We love this tool.
    Until now we have been connecting to web services using basic
    authentication, without any problems.
    However, I now need to connect to a RESTFul web service that requires
    OAuth authentication, which we have never done before. I would
    appreciate any help in pointing out the necessary steps to implement
    OAuth authentication when connecting to a RESTFul web service.
    Thank you.
    Miguel A. Caraballo

------------------------------

Message: 2
Date: Wed, 24 Apr 2013 19:45:33 +0100
From: Garry Taylor <taylor.garry@xxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: OAuth Authentication
Message-ID:
	<CAO38P5040z82E3_WMytEML6e0wQ9TkV1Kk6L+-iC+fkn03utYw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

There are many implementations of OAuth, but generally they *require* a web browser, i.e. a real graphical web browser. Some don't though, and it depends on the service. Google services often do not need a web browser, Twitter has a workaround, but others, like perhaps Dropbox, need a web browser and there is no real decent way around it as far as I know.

It depends on the specific service you want to access.

Cheers

Garry


On Wed, Apr 24, 2013 at 2:43 PM, Miguel Caraballo < miguel.caraballo@xxxxxxxxxxxxxx> wrote:

    Hi All,
    HTTPAPI is our tool of choice for processing data obtained via web
    services. We love this tool.
    Until now we have been connecting to web services using basic
    authentication, without any problems.
    However, I now need to connect to a RESTFul web service that requires
    OAuth authentication, which we have never done before. I would
    appreciate any help in pointing out the necessary steps to implement
    OAuth authentication when connecting to a RESTFul web service.
    Thank you.
    Miguel A. Caraballo

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


-------------- next part --------------
    There are many implementations of OAuth, but generally they *require* a
    web browser, i.e. a real graphical web browser. Some don't though, and
    it depends on the service. Google services often do not need a web
    browser, Twitter has a workaround, but others, like perhaps Dropbox,
    need a web browser and there is no real decent way around it as far as
    I know.
    It depends on the specific service you want to access.
    Cheers
    Garry

    On Wed, Apr 24, 2013 at 2:43 PM, Miguel Caraballo
    <[1]miguel.caraballo@xxxxxxxxxxxxxx> wrote:

         Hi All,
         HTTPAPI is our tool of choice for processing data obtained via
      web
         services. We love this tool.
         Until now we have been connecting to web services using basic
         authentication, without any problems.
         However, I now need to connect to a RESTFul web service that
      requires
         OAuth authentication, which we have never done before. I would
         appreciate any help in pointing out the necessary steps to
      implement
         OAuth authentication when connecting to a RESTFul web service.
         Thank you.
         Miguel A. Caraballo
      --------------------------------------------------------------------
      ---
      This is the FTPAPI mailing list.  To unsubscribe, please go to:
      [2]http://www.scottklement.com/mailman/listinfo/ftpapi
      --------------------------------------------------------------------
      ---

References

    1. mailto:miguel.caraballo@xxxxxxxxxxxxxx
    2. http://www.scottklement.com/mailman/listinfo/ftpapi

------------------------------

Message: 3
Date: Wed, 24 Apr 2013 14:02:32 -0500
From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: OAuth Authentication
Message-ID: <51782C48.9060401@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

HTTPAPI does not have it's own built-in support for OAuth. However, you can write your own (or maybe find one on the Internet that you can
download) and use it with HTTPAPI.

-SK

On 4/24/2013 8:43 AM, Miguel Caraballo wrote:
     Hi All,
     HTTPAPI is our tool of choice for processing data obtained via web
     services. We love this tool.
     Until now we have been connecting to web services using basic
     authentication, without any problems.
     However, I now need to connect to a RESTFul web service that requires
     OAuth authentication, which we have never done before. I would
     appreciate any help in pointing out the necessary steps to implement
     OAuth authentication when connecting to a RESTFul web service.
     Thank you.
     Miguel A. Caraballo



------------------------------

Message: 4
Date: Wed, 24 Apr 2013 13:27:08 -0700
From: "James H. H. Lampert" <jamesl@xxxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: OAuth Authentication
Message-ID: <5178401C.1040500@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 4/24/13 6:43 AM, Miguel Caraballo wrote:
     Hi All,
     HTTPAPI is our tool of choice for processing data obtained via web
     services. We love this tool.
     Until now we have been connecting to web services using basic
     authentication, without any problems.
     However, I now need to connect to a RESTFul web service that requires
     OAuth authentication, which we have never done before. I would
     appreciate any help in pointing out the necessary steps to implement
     OAuth authentication when connecting to a RESTFul web service.
     Thank you.
     Miguel A. Caraballo
Hmm. I have some small experience with this (VERY specific to Google Calendar), and I can say that Google's OAuth Playground is the best tool I've found for working out the details of OAuth, at least for their services.

That's not to say that I'm in any position to teach anybody how to do it; it's been months since I did anything with it, and the mere thought of doing it again makes me shudder.

--
JHHL



------------------------------

Message: 5
Date: Thu, 25 Apr 2013 09:58:10 -0400
From: Craig Jacobsen <CJacobsen@xxxxxxxxxxxxx>
To: "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: UPS soap shiprequest example
Message-ID:
	<7B3A663BA3886D49BC4D8F1CF70361EF02B00ED3A8@xxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

We are researching using UPS to send shipments.
We currently use FedEx mostly utilizing their server in house.
We also used DHL which was a REST service Anyone have an example program for UPS shiprequest using SOAP?
If not anyone have any shipping examples?
I can use Example 14 for tracking even though it doesn't use SOAP, it does work with my credentials.

Thanks,

Craig


Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.  Unless expressly stated in this e-mail, nothing in this message or any attachment should be construed as a digital or electronic signature.
-------------- next part --------------
    We are researching using UPS to send shipments.

    We currently use FedEx mostly utilizing their server in house.

    We also used DHL which was a REST service

    Anyone have an example program for UPS shiprequest using SOAP?

    If not anyone have any shipping examples?

    I can use Example 14 for tracking even though it doesn't use SOAP, it
    does work with my credentials.


    Thanks,


    Craig


    Confidentiality Notice: This e-mail message, including any attachments,
    is for the sole use of the intended recipient(s) and may contain
    confidential and privileged information. Any unauthorized review, use,
    disclosure or distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply e-mail and destroy all
    copies of the original message. Unless expressly stated in this e-mail,
    nothing in this message or any attachment should be construed as a
    digital or electronic signature.

------------------------------

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


End of Ftpapi Digest, Vol 78, Issue 38
**************************************
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------