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

RE: Headers



What headers are you getting? Look in your debug and copy them into your email.

You can create your own headers but I think the ones you are using are pretty normal. The user Agent is settable on some of the procedures. For example:
rc = http_post_xml( 'http://twitter.com/statuses/update.xml'
                  : postData                                
                  : postDataSize                            
                  : *null                                   
                  : %paddr(xmlReply)                        
                  : %addr(tweet)                            
                  : HTTP_TIMEOUT                            
                  : HTTP_USERAGENT                          
                  : 'application/x-www-form-urlencoded' );  

See where it says HTTP_USERAGENT? Just type in what you want for that one (HTTP_USERAGENT is constant defined in the bowels of HTTPAPI).
As you can see, the next parameter is the content-Type parameter. Send what you want for that too.

To send custom headers use:

http_xproc(HTTP_POINT_ADDL_HEADER : %paddr(Add_Headers));

Add_Headers is a procedure you write. You can call it whatever you want. This forum post has an example procedure and explanation.

http://www.scottklement.com/archives/ftpapi/200901/msg00068.html



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mauricio Diaz-Lapham
Sent: Thursday, April 25, 2013 1:50 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Headers

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
-----------------------------------------------------------------------