Cheers tracey I am going to pick apart the vfptweetapi as it seems to contain 
everything I need

-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Tracy Pearson
Sent: Thursday, 06 September 2018 20:14
To: profoxt...@leafe.com
Subject: RE: SOAP

You need to add a header. How it is formatted depends on the API.
I have this code, I'm also using the Chilkat ActiveX control for the HTTP 
requests.
oHTTPRequest.AddHeader("Authorization", "Bearer " + Token)

As an side note, I started using the Chilkat control over the MSXML control 
because the logging. 
The MSXML doesn't have connectivity logging to diagnose problems. Chilkat does.

Have fun,
Tracy

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:51 PM
To: profoxt...@leafe.com
Subject: RE: SOAP

Keeping it basic at the moment with MsXml2.XmlHttp

But I have noticed in the middle of vfpoauth there is a signrequest method that 
doesn't seem to be used ... I have also ventured into the vfptweetapi and that 
has the same function so I will delve deeper tomorrow


-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Tracy Pearson
Sent: Thursday, 06 September 2018 19:31
To: profoxt...@leafe.com
Subject: RE: SOAP

What are you using to make the web requests in VFP?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:12 PM
To: profoxt...@leafe.com
Subject: Re: SOAP

Progress I have managed to use vfpoauth to get my access token now I need to 
work out how to sign a request in vfp , I can get it to work in postman 

> On 6 Sep 2018, at 19:01, Stephen Russell <srussell...@gmail.com> wrote:
> 
> This might help?
> 
> https://github.com/VFPX/VFPOAuth
> 
> 
> 
> 
> 
>> On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <chr...@actongate.co.uk> wrote:
>> 
>> Thanks Stephen, I am struggling with oAuth at the moment, the 
>> documentation gives examples but obviously not in VFP and it looks 
>> like things like javascript and php include oauth modules.
>> 
>> So if I can reword my question, has anyone got any oauth code 😊
>> 
>> -----Original Message-----
>> From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Stephen 
>> Russell
>> Sent: Thursday, 06 September 2018 15:20
>> To: profoxt...@leafe.com
>> Subject: Re: SOAP
>> 
>> To be honest, REST is just a way that sets up an interaction in 
>> complex ways without the client knowing anything beforehand about the 
>> server and the resources it hosts. You define that the transmission 
>> is going to be HTTP and then follow the rules for it.
>> 
>> Now your call to the API can be done from a web browser, an app on a 
>> phone or a tablet.
>> 
>> here is something I wrote to get data for ExchangeRates.
>> apicall.Clear();  // This is a string to hold the params for the call 
>> I am making for data
>> 
>> apicall.Append("api/historical/" + EOM);
>> 
>> 
>> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
>>     // get the dates for use in the string  HttpResponseMessage 
>> httpResponseMessage = await client.GetAsync(apicall.ToString());
>>   HttpResponseMessage response = httpResponseMessage;
>>          if (response.IsSuccessStatusCode)
>>                {      //  put the data returend into a data object I have
>> local.
>>          eRateReturn rate = await
>> response.Content.ReadAsAsync<eRateReturn>();
>> 
>> 
>> 
>> Here is eRateReturn class(s) for data:
>> public class Rates
>>        {
>>            public float GBP { get; set; }
>>            public float CAD { get; set; }
>>            public float USD { get; set; }
>>            public float EUR { get; set; }
>>        }
>> 
>>        public class eRateReturn
>>        {
>>            public float timestamp { get; set; }
>>            public string Base { get; set; }
>>            public DateTime date { get; set; }
>>        public Rates rates {get; set;}
>>        }
>> 
>> 
>> 
>> 
>> 
>>> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <chr...@actongate.co.uk> wrote:
>>> 
>>> Thanks for the reply Russell, I have now discovered this particular 
>>> thing also supports REST api, just trying to figure out oAuth
>>> 
>>> -----Original Message-----
>>> From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Stephen 
>>> Russell
>>> Sent: Thursday, 06 September 2018 14:30
>>> To: profoxt...@leafe.com
>>> Subject: Re: SOAP
>>> 
>>> Too bad that Alan is no longer among us, he redid his application 
>>> all in Web Service calls years ago.
>>> 
>>> In general, the "service" is a replacement for a data store.  You 
>>> ask for data from the service and it gives it to you in SOAP, xml that is.
>>> What you actually receive is some sort of collection of data, that 
>>> may have collections within it.  You could do the same thing in 
>>> arrays if you wanted in VFP.
>>> 
>>> Now the data is yours to use at your desire.  You may have to 
>>> package the data back into XML that mimics the data they sent you 
>>> for inserts, updates, maybe even deletes.  Now through the "service"
>>> you post that XML pack to them.
>>> 
>>> Today the industry is changing the name from Web Service to API but 
>>> in general it works in much the same way.
>>> 
>>> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <chr...@actongate.co.uk>
>> wrote:
>>> 
>>>> Is anyone able to share an example of working with a webservice 
>>>> purely in code?
>>>> 
>>>> Thanks
>>>> 
>>>> Chris.
>>>> 
>>>> 
>>>> --- StripMime Report -- processed MIME parts --- 
>>>> multipart/alternative  text/plain (text body -- kept)  text/html
>>>> ---
>>>> 
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/000801d44615$c15d6d10$44184730$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: 
http://leafe.com/reportAbuse/000801d44615$c15d6d10$44184730$@powerchurch.com
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cwlp265mb16688d3f72ad637deefd3f958f...@cwlp265mb1668.gbrp265.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to