I have a spec project where I need to build an application using a REST API to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a five-minute life span), issue my requests with the token and then get the results back in a JSON or XML format. Based on recommendations I received at the Virtual FoxFest earlier this year, I purchased the Chilkat tools and dove into what has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me to understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able to get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for a similar process (Request a token, then make requests with the token) using the Chilkat tools they would be willing to share? A Foxpro wrapper would be too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST API to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a five-minute life span), issue my requests with the token and then get the results back in a JSON or XML format. Based on recommendations I received at the Virtual FoxFest earlier this year, I purchased the Chilkat tools and dove into what has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me to understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able to get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for a similar process (Request a token, then make requests with the token) using the Chilkat tools they would be willing to share? A Foxpro wrapper would be too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Chilkat wrapper highlights (off the top of my head)...
Wrappers are VCX classes. For a Chilkat method, there's a corresponding VFP method with a header containing some pertinent info, like a one line description, followed by the full online description for that method. If a method parameter accepts a 0/1 parameter, you can pass a VFP .F./.T. with a property setting on the object. If the method returns a 0/1, another property setting will return a .F./.T. for your convenience. The code for the method is very straightforward and plain to aid understanding. Lotsa side stuff handled in other methods.
Properties all have hidden access and assign methods. The access method will contain the online Chilkat description for that property. The access and assign methods (in essence) route the call to their Chilkat equivalent type methods - LongBit, LongBitReadOnly, String, StringReadOnly, etc. - but that's all beneath the sheets. This is done to save on coding...as it is I'm already up to 15 megs or so, probably 85% comments of one form or another.
Both properties and methods will do version testing if required -- methods will test within the method itself while the property version number will be passed as a parameter.
There's also object version testing where necessary. For instance, the Rest control came out in version 9.5.0.58. If you're on version 9.5.0.57, you don't have this class!
If you peruse the property sheet you'll see whatever description I could fit in the space.
Undocumented/decremented properties/methods/class(es) have all been added. Where I could find documentation I added it. It looks like there were methods and properties that returned or passed VFP DateTime values that are now not documented. I've pointed them out where I could.
On Sat, Jul 9, 2022 at 5:04 PM Bill Anderson billand88@gmail.com wrote:
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST API to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a five-minute life span), issue my requests with the token and then get the results back in a JSON or XML format. Based on recommendations I received at the Virtual FoxFest earlier this year, I purchased the Chilkat tools and dove into what has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me to understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able to get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for a similar process (Request a token, then make requests with the token) using the Chilkat tools they would be willing to share? A Foxpro wrapper would be too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Sounds very interesting. Do you have some ETA in mind for selling/releasing the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results back in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me to understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for
a
similar process (Request a token, then make requests with the token) using the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Paul,
I'd assume this'd go to VFPX on Github at some point. I'll probably complete the wrapping some time in August or thereabouts, but not sure I'd upload it at that time...
Another thing it does is it validates properties. If there's a range or a list of values for a given property, the mechanism to process properties is so abstracted that validating said properties wasn't too big a deal. As of this version, method parameters are not validated.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for selling/releasing the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Bill,
Sounds very promising and pretty awesome in fact. Unfortunately, I'm in the midst of prototyping to confirm viability of the project and in order to prove that, I have to write some functioning code. I pounded on the keyboard today and made only a little bit of progress but just enough to keep my hopes up.
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Monday, July 11, 2022 2:39 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
Paul,
I'd assume this'd go to VFPX on Github at some point. I'll probably complete the wrapping some time in August or thereabouts, but not sure I'd upload it at that time...
Another thing it does is it validates properties. If there's a range or a list of values for a given property, the mechanism to process properties is so abstracted that validating said properties wasn't too big a deal. As of this version, method parameters are not validated.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for
selling/releasing
the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103
classes
(1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the
web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a
different
system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get
the
token.
My question is this: Does anyone have any sample Foxpro code they use
for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists.
I've
got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
On Jul 11, 2022, at 16:51, Paul H. Tarver paul@tpcqpc.com wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver paul@tpcqpc.com wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.commailto:paul@tpcqpc.com> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
And I know you're using Chilkat but West-Wind has some good, simple examples of using REST with VFP. IIRC Rick also did that as a session at SWFox so you've probably got that whitepaper in the downloads.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 10:20 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.com<mailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com> Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.com<mailto:paul@tpcqpc.commailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com>> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
I wish it was as easy to program as it was to read your explanation! :)
But I guess if it were really easy, then everyone would be learning to code. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 9:20 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.commailto:paul@tpcqpc.com> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
That was the 30,000 for view, of course. 😊
Gotta get your head wrapped around the requirements of the API you’re calling. What I’m referring to is the architecture of the internal APIs written by my engineering team here. There are a couple of different flavors and the token handling isn’t consistent between the two. I really did find that going through Rick’s tutorials were very helpful since it’s got the VFP perspective.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 11:19 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
I wish it was as easy to program as it was to read your explanation! :)
But I guess if it were really easy, then everyone would be learning to code. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 9:20 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.com<mailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com> Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.com<mailto:paul@tpcqpc.commailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com>> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.commailto:ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profoxhttps://protect-us.mimecast.com/s/E5mfCERZ20IBYvmcZv6_E?domain=mail.leafe.com OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtechhttps://protect-us.mimecast.com/s/yYx2CG6Y2Mhw6DmI0qy2F?domain=mail.leafe.com Searchable Archive: https://leafe.com/archiveshttps://protect-us.mimecast.com/s/DNBrCJ6Y2NhxV6RSpkpeI?domain=leafe.com This message: https://leafe.com/archives/byMID/062301d89602$bbdb1db0$33915910$@tpcqpc.comhttps://protect-us.mimecast.com/s/tAJxCKrY2LTL6XlFnW-sD?domain=leafe.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.
I started reading Rick's material yesterday and it definitely helped me get to the point of getting an OAuth2.0 token back. I just need to get back and finish reading his work and the API documentation (which is definitely not written for VFP!) and maybe it will help me understand how to convert the Postman information into VFP code which calls Chilkat tools to accomplish building the data requests. I got the token request and a data request functioning in Postman first which did help but none of the code examples are from a VFP point of view, so I'm having to translate their code into something I can use in VFP with Chilkat. I'm pretty sure I can handle the extraction of the data from the responses. In fact, I ran into a situation yesterday where the Chilkat LoadJson function wasn't working right and it turned out the token response didn't match the layout Chilkat expects. So, I just used VFP Alines() to break apart the Json elements which worked quite nicely.
Getting my head wrapped around the formation of the API requests is without a doubt the hardest part of this. However, trying to learn Chilkat + API at the same time is making the process more complicated I think. That's why I was hoping to get some other sample code to review since Chilkat's examples are mostly for specific published API's and do not use a more generalized approach. At least I figured out yesterday how to use Chilkat to get more useful feedback from the API server than just the 400 error so that has been helpful.
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 10:54 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
That was the 30,000 for view, of course. 😊
Gotta get your head wrapped around the requirements of the API you’re calling. What I’m referring to is the architecture of the internal APIs written by my engineering team here. There are a couple of different flavors and the token handling isn’t consistent between the two. I really did find that going through Rick’s tutorials were very helpful since it’s got the VFP perspective.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 11:19 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
I wish it was as easy to program as it was to read your explanation! :)
But I guess if it were really easy, then everyone would be learning to code. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 9:20 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.com<mailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com> Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.com<mailto:paul@tpcqpc.commailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com>> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
One key point from my own journey with this stuff. CaSe matters. If the a key value is myData, you need to make sure that case gets preserved. By default, VFP doesn’t preserve case when consuming and producing JSON so you have to explicitly make sure you’re doing that. Rick’s got stuff in his classes that makes it easy to ensure that case is preserved in those JSON responses. I can’t tell you how many times I was getting bad results because I missed a difference in case. 😊
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 3:13 PM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
I started reading Rick's material yesterday and it definitely helped me get to the point of getting an OAuth2.0 token back. I just need to get back and finish reading his work and the API documentation (which is definitely not written for VFP!) and maybe it will help me understand how to convert the Postman information into VFP code which calls Chilkat tools to accomplish building the data requests. I got the token request and a data request functioning in Postman first which did help but none of the code examples are from a VFP point of view, so I'm having to translate their code into something I can use in VFP with Chilkat. I'm pretty sure I can handle the extraction of the data from the responses. In fact, I ran into a situation yesterday where the Chilkat LoadJson function wasn't working right and it turned out the token response didn't match the layout Chilkat expects. So, I just used VFP Alines() to break apart the Json elements which worked quite nicely.
Getting my head wrapped around the formation of the API requests is without a doubt the hardest part of this. However, trying to learn Chilkat + API at the same time is making the process more complicated I think. That's why I was hoping to get some other sample code to review since Chilkat's examples are mostly for specific published API's and do not use a more generalized approach. At least I figured out yesterday how to use Chilkat to get more useful feedback from the API server than just the 400 error so that has been helpful.
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 10:54 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
That was the 30,000 for view, of course. 😊
Gotta get your head wrapped around the requirements of the API you’re calling. What I’m referring to is the architecture of the internal APIs written by my engineering team here. There are a couple of different flavors and the token handling isn’t consistent between the two. I really did find that going through Rick’s tutorials were very helpful since it’s got the VFP perspective.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 11:19 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
I wish it was as easy to program as it was to read your explanation! :)
But I guess if it were really easy, then everyone would be learning to code. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 9:20 AM To: profoxtech@leafe.com<mailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com> Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.com<mailto:profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com%3cmailto:profoxtech-bounces@leafe.com>> On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.com<mailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com> Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.com<mailto:profoxtech@leafe.com<mailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com>> Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.com<mailto:paul@tpcqpc.com<mailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.commailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com>>> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.commailto:ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profoxhttps://protect-us.mimecast.com/s/VinXCyP6D9TY4k5SNl7Ni?domain=mail.leafe.com OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtechhttps://protect-us.mimecast.com/s/mbWICzpBE7uKr9otwwd7C?domain=mail.leafe.com Searchable Archive: https://leafe.com/archiveshttps://protect-us.mimecast.com/s/Swd_CADQ2MIjR2AU2SHvK?domain=leafe.com This message: https://leafe.com/archives/byMID/06a601d89623$628f2640$27ad72c0$@tpcqpc.comhttps://protect-us.mimecast.com/s/UQFICBB82PuvnB5fr47ys?domain=leafe.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.
Hi Paul
Sorry only just got around to your email in my inbox! Do you have a link to the API documentation? or if not, as well as the token end point in your code (/rest/api/token/) do you also have an authorisation end point?
Regards
Chris.
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: 12 July 2022 20:13 To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
I started reading Rick's material yesterday and it definitely helped me get to the point of getting an OAuth2.0 token back. I just need to get back and finish reading his work and the API documentation (which is definitely not written for VFP!) and maybe it will help me understand how to convert the Postman information into VFP code which calls Chilkat tools to accomplish building the data requests. I got the token request and a data request functioning in Postman first which did help but none of the code examples are from a VFP point of view, so I'm having to translate their code into something I can use in VFP with Chilkat. I'm pretty sure I can handle the extraction of the data from the responses. In fact, I ran into a situation yesterday where the Chilkat LoadJson function wasn't working right and it turned out the token response didn't match the layout Chilkat expects. So, I just used VFP Alines() to break apart the Json elements which worked quite nicely.
Getting my head wrapped around the formation of the API requests is without a doubt the hardest part of this. However, trying to learn Chilkat + API at the same time is making the process more complicated I think. That's why I was hoping to get some other sample code to review since Chilkat's examples are mostly for specific published API's and do not use a more generalized approach. At least I figured out yesterday how to use Chilkat to get more useful feedback from the API server than just the 400 error so that has been helpful.
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 10:54 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
That was the 30,000 for view, of course. 😊
Gotta get your head wrapped around the requirements of the API you’re calling. What I’m referring to is the architecture of the internal APIs written by my engineering team here. There are a couple of different flavors and the token handling isn’t consistent between the two. I really did find that going through Rick’s tutorials were very helpful since it’s got the VFP perspective.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 11:19 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
I wish it was as easy to program as it was to read your explanation! :)
But I guess if it were really easy, then everyone would be learning to code. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, July 12, 2022 9:20 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.com<mailto:profoxtech@leafe.commailto:profoxtech@leafe.com%3cmailto:profoxtech@leafe.com> Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.com<mailto:paul@tpcqpc.commailto:paul@tpcqpc.com%3cmailto:paul@tpcqpc.com>> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/06a601d89623$628f2640$27ad72c0$@tpcqpc.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.
Do you use Postman to test what yo need to do with the API? Then just make the same call from the web side of VFP. Catch json responses and you are good.
On Tue, Jul 12, 2022 at 9:20 AM Richard Kaye rkaye@invaluable.com wrote:
Generally speaking, the token is the key that unlocks access to the APIs you want to call. So you need to persist that in your business object, and pass it to any API calls you make. Depending on the API you're hitting, the token value could be in the request header or it could be a key:value pair in the payload.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: Tuesday, July 12, 2022 9:38 AM To: profoxtech@leafe.com Subject: RE: Need Help - Foxpro & Chilkat & Rest API
Definitely!
I did have a small breakthrough yesterday as I was able to get an OAuth2 Token returned from within VFP. Woohoo!
Now if I can just figure out what to do with it. :)
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, July 11, 2022 4:54 PM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
On Jul 11, 2022, at 16:51, Paul H. Tarver <paul@tpcqpc.commailto: paul@tpcqpc.com> wrote:
I'll keep looking for your project and when you release it, I'll definite consider upgrading to your tool as soon as I can.
Sounds like a potential beta tester! ;-)
-- Ed Leafe
[excessive quoting removed by server]
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who knows what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for selling/releasing the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I'd sell it back to Chilkat.
Alan,
I'd sell it back to Chilkat.<<
1) Chilkat decremented their VFP specific methods and properties so I just don't see why they would have an interest. 2) I've basically repackaged their own documentation...
Bill Anderson
On Tue, Aug 2, 2022 at 12:53 AM Alan Bourke alanpbourke@fastmail.fm wrote:
I'd sell it back to Chilkat.
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]
Bill,
- Chilkat decremented their VFP specific methods and properties so I just
don't see why they would have an interest.
Could you elaborate a bit on this? I had the opposite feeling that Chilkat was going to lengths to provide functionalities that wouldn't usually be part of a VFP set, like asynchronous calls.
Thanks
António
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Antonio,
(Asynchronous calls) Yep, that's where Chilkat's power resides.
What tipped me off was this - check this link. https://www.chilkatsoft.com/refdoc/xChilkatSFtpRef.html#method26 - it mentions "The same as GetCreateFileTime, except...". Scroll up. There's no documentation for GetCreateFileTime. Instantiate the SFTP object in the command window and display the properties/methods. The method is there.
From experience the GetCreateFileTime method will return a VFP DateTime
value.
Instantiate the Email object. The EmailDateStr is documented, EmailDate isn't. But you can immediately return the EmailDate property and it's a VFP DateTime value.
Things like that tell me Chilkat hid these for a reason. They still work, but they're decremented.
Bill Anderson
On Wed, Aug 3, 2022 at 9:09 AM António Tavares Lopes atlopes@gmail.com wrote:
Bill,
- Chilkat decremented their VFP specific methods and properties so I
just
don't see why they would have an interest.
Could you elaborate a bit on this? I had the opposite feeling that Chilkat was going to lengths to provide functionalities that wouldn't usually be part of a VFP set, like asynchronous calls.
Thanks
António
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks for replying, Bill.
From where I see it, it looks more like a documentation bug. The
description of GetFileCreateTime is missing in other libraries, too (C++, Ruby, ...). It does not seem to be specific to VFP (or even to the ActiveX implementation).
Chilkat has excellent support; probably, it's a matter of pointing out the problem in the documentation.
António
On Wed, Aug 3, 2022 at 6:42 PM Bill Anderson billand88@gmail.com wrote:
Antonio,
(Asynchronous calls) Yep, that's where Chilkat's power resides.
What tipped me off was this - check this link. https://www.chilkatsoft.com/refdoc/xChilkatSFtpRef.html#method26 - it mentions "The same as GetCreateFileTime, except...". Scroll up. There's no documentation for GetCreateFileTime. Instantiate the SFTP object in the command window and display the properties/methods. The method is there.
From experience the GetCreateFileTime method will return a VFP DateTime
value.
Instantiate the Email object. The EmailDateStr is documented, EmailDate isn't. But you can immediately return the EmailDate property and it's a VFP DateTime value.
Things like that tell me Chilkat hid these for a reason. They still work, but they're decremented.
Bill Anderson
On Wed, Aug 3, 2022 at 9:09 AM António Tavares Lopes atlopes@gmail.com wrote:
Bill,
- Chilkat decremented their VFP specific methods and properties so I
just
don't see why they would have an interest.
Could you elaborate a bit on this? I had the opposite feeling that
Chilkat
was going to lengths to provide functionalities that wouldn't usually be part of a VFP set, like asynchronous calls.
Thanks
António
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Chilkat has excellent support; probably, it's a matter of pointing out
the problem in the documentation.<<
Doubtful, in my opinion (though I don't know). Those are only two examples, but there are dozens.
At one point during this process I sent an email to Chilkat support, mentioning how a class is missing some of the properties that it claims to have on the web site (the opposite situation). Never heard back.
Bill Anderson
On Thu, Aug 4, 2022 at 8:28 AM António Tavares Lopes atlopes@gmail.com wrote:
Thanks for replying, Bill.
From where I see it, it looks more like a documentation bug. The
description of GetFileCreateTime is missing in other libraries, too (C++, Ruby, ...). It does not seem to be specific to VFP (or even to the ActiveX implementation).
Chilkat has excellent support; probably, it's a matter of pointing out the problem in the documentation.
António
On Wed, Aug 3, 2022 at 6:42 PM Bill Anderson billand88@gmail.com wrote:
Antonio,
(Asynchronous calls) Yep, that's where Chilkat's power resides.
What tipped me off was this - check this link. https://www.chilkatsoft.com/refdoc/xChilkatSFtpRef.html#method26 - it mentions "The same as GetCreateFileTime, except...". Scroll up. There's
no
documentation for GetCreateFileTime. Instantiate the SFTP object in the command window and display the properties/methods. The method is there.
From experience the GetCreateFileTime method will return a VFP DateTime
value.
Instantiate the Email object. The EmailDateStr is documented, EmailDate isn't. But you can immediately return the EmailDate property and it's a
VFP
DateTime value.
Things like that tell me Chilkat hid these for a reason. They still work, but they're decremented.
Bill Anderson
On Wed, Aug 3, 2022 at 9:09 AM António Tavares Lopes atlopes@gmail.com wrote:
Bill,
- Chilkat decremented their VFP specific methods and properties so I
just
don't see why they would have an interest.
Could you elaborate a bit on this? I had the opposite feeling that
Chilkat
was going to lengths to provide functionalities that wouldn't usually
be
part of a VFP set, like asynchronous calls.
Thanks
António
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Rick,
Apologize for terseness, writing on iPhone…
If I were a Magic 8 Ball - “Signs Point To Yes”
Bill Anderson The Anderson Files LLC
On Aug 4, 2022, at 8:28 AM, António Tavares Lopes atlopes@gmail.com wrote:
Thanks for replying, Bill.
From where I see it, it looks more like a documentation bug. The
description of GetFileCreateTime is missing in other libraries, too (C++, Ruby, ...). It does not seem to be specific to VFP (or even to the ActiveX implementation).
Chilkat has excellent support; probably, it's a matter of pointing out the problem in the documentation.
António
On Wed, Aug 3, 2022 at 6:42 PM Bill Anderson billand88@gmail.com wrote:
Antonio,
(Asynchronous calls) Yep, that's where Chilkat's power resides.
What tipped me off was this - check this link. https://www.chilkatsoft.com/refdoc/xChilkatSFtpRef.html#method26 - it mentions "The same as GetCreateFileTime, except...". Scroll up. There's no documentation for GetCreateFileTime. Instantiate the SFTP object in the command window and display the properties/methods. The method is there.
From experience the GetCreateFileTime method will return a VFP DateTime
value.
Instantiate the Email object. The EmailDateStr is documented, EmailDate isn't. But you can immediately return the EmailDate property and it's a VFP DateTime value.
Things like that tell me Chilkat hid these for a reason. They still work, but they're decremented.
Bill Anderson
On Wed, Aug 3, 2022 at 9:09 AM António Tavares Lopes atlopes@gmail.com wrote:
Bill,
- Chilkat decremented their VFP specific methods and properties so I
just
don't see why they would have an interest.
Could you elaborate a bit on this? I had the opposite feeling that
Chilkat
was going to lengths to provide functionalities that wouldn't usually be part of a VFP set, like asynchronous calls.
Thanks
António
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
That's awesome, Bill. In the meantime, I was able after several re-writes to get my prototype working and pulling data from the source API. One caveat to anyone who is trying to do this, consider trying to make it work with the Chilkat HTTP tool for sending and receiving requests. It seems to be easier than the REST tool and works better.
I would also like to point out that the Online Tools provided by Chilkat (https://tools.chilkat.io/) are freaking amazing. I learned much more and much faster by using things like the JSON Code Generator where you enter JSON text and then let the tool generate the Foxpro code that it would take to create the sample JSON. I also got a LOT out of the Postman Code Generator. In this tool, you can upload a Postman project export and the tool will generate the corresponding Foxpro code from the Postman details. It's not perfect, but it certainly helped me to understand a lot more about how the Chilkat tools worked and how to adapt them for my project.
Still a long way from being finished, but I've at least been able to prove the viability of what I'm trying to accomplish and considering how much I knew 60 days ago about API and Chilkat and JSON, I'm counting this as a major win! :)
I look forward getting a chance to play with your wrapper code and I'm betting I'll learn even more!
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Monday, August 01, 2022 4:02 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who knows what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for
selling/releasing
the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103
classes
(1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the
web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a
different
system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get
the
token.
My question is this: Does anyone have any sample Foxpro code they use
for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists.
I've
got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
that sounds like a great future Virtual FoxFest session, Bill!!!!! hint hint....
On 8/1/2022 5:01 PM, Bill Anderson wrote:
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who knows what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for selling/releasing the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
It sure does! Thanks for volunteering to do that, Bill! :)
On Wed, Aug 3, 2022 at 7:03 AM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
that sounds like a great future Virtual FoxFest session, Bill!!!!! hint hint....
On 8/1/2022 5:01 PM, Bill Anderson wrote:
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who
knows
what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for
selling/releasing
the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of
Bill
Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103
classes
(1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The
upside -
They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the
web.
Rest is one of the classes I've wrapped, FWIW but that may not
necessarily
help clarify your issue. If you think it might, just send me an email -
or
I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a
different
system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be
able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get
the
token.
My question is this: Does anyone have any sample Foxpro code they use
for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper
would
be
too much to hope for, but that would be even better if it is exists.
I've
got to get to a point where I'm beyond this initial stage to prove I
can
make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Mike,
Well, it's on the ToDo list. But I promised a different session to the VFF trio last year and that fizzled because of, well, life, and I don't want to raise hopes and have me flake out again. I may yet do that last year's planned session. I had actually toyed with this Chilkat idea in late 2019 when I toyed around with using the tool then but then the job I had got Corona'd and that was that. While the subject matter (Chilkat) is much broader, a session would be easier to organize than the subject matter I planned last year. And I can make the argument (in my mind) a higher priority would be to rewrite all the Chilkat example code for VFP and cross reference it to the Chilkat objects/properties/methods via a searchable DBF. Like the wrapping project it'd be "just turn the crank" after a while.
But first let's see if I get documentation together and actually release what I have - then you know I'm serious <g>.
Bill Anderson
On Wed, Aug 3, 2022 at 5:04 AM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
that sounds like a great future Virtual FoxFest session, Bill!!!!! hint hint....
On 8/1/2022 5:01 PM, Bill Anderson wrote:
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who
knows
what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for
selling/releasing
the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of
Bill
Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103
classes
(1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The
upside -
They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the
web.
Rest is one of the classes I've wrapped, FWIW but that may not
necessarily
help clarify your issue. If you think it might, just send me an email -
or
I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a
different
system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be
able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get
the
token.
My question is this: Does anyone have any sample Foxpro code they use
for
a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper
would
be
too much to hope for, but that would be even better if it is exists.
I've
got to get to a point where I'm beyond this initial stage to prove I
can
make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Folks,
An update. I was thinking about releasing yesterday but to make a long story short, some of what I've done needs a rethink. Otherwise I'm releasing something you're not going to like...
Let me explain.
I did get through all the properties and methods and everything on my todo list. While tracking down a random issue that turned out to be a misnamed property, it hit me that I hadn't done much testing against large data.
More background...
The goal of this is to have a Visual Foxpro object mimic the related Chilkat object. For instance, the Chilkat EMail object has a FromName property. The related VFP object, apply named Email has a FromName object. Beneath the sheets, when you reference the VFP Email FromName property, it goes out to retrieve the Chilkat Email FromName property. Pretty straightforward.
I was fortunate enough to actually deal with a Chilkat character property that is 260 characters in length. When I referenced it, VFP blew up. And it turns out it's a hard coded limitation *if you define it on the property sheet*. See AddProperty Method in the help file. I've tried to trick VFP into making something larger but it doesn't work.
But the Comment and Tag properties of VFP objects can be as large as you like (within reason), but these are predefined. The AddProperty() function also doesn't have that limitation. Yes, you can use the AddProperty() function on an existing property but the Access method fires before the redefinition and it gets ugly.
In this specific example the Chilkat property was named "P". So the VFP property with the Access/Assign methods was named "P_VFP" but wrote the value to the "P" property (with no Access/Assign methods). In the Init method of the object I AddProperty() the existing "P" property out to 260 characters.
And it works, though it's not as clean as one would like...
But now think of the size of some web pages, binary file contents, and so forth. I need to either come up with a cleaner solution or make a second pass and ripple this idea through more character and binary data.
Bill Anderson
On Mon, Aug 1, 2022 at 2:01 PM Bill Anderson billand88@gmail.com wrote:
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who knows what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for selling/releasing the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside - They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a
different
system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me
to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able
to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get
the
token.
My question is this: Does anyone have any sample Foxpro code they use
for a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper would
be
too much to hope for, but that would be even better if it is exists.
I've
got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Folks,
I just figured out a solution to my large data issue so actually releasing is back on the horizon...
Bill Anderson
On Wed, Aug 31, 2022 at 5:29 PM Bill Anderson billand88@gmail.com wrote:
Folks,
An update. I was thinking about releasing yesterday but to make a long story short, some of what I've done needs a rethink. Otherwise I'm releasing something you're not going to like...
Let me explain.
I did get through all the properties and methods and everything on my todo list. While tracking down a random issue that turned out to be a misnamed property, it hit me that I hadn't done much testing against large data.
More background...
The goal of this is to have a Visual Foxpro object mimic the related Chilkat object. For instance, the Chilkat EMail object has a FromName property. The related VFP object, apply named Email has a FromName object. Beneath the sheets, when you reference the VFP Email FromName property, it goes out to retrieve the Chilkat Email FromName property. Pretty straightforward.
I was fortunate enough to actually deal with a Chilkat character property that is 260 characters in length. When I referenced it, VFP blew up. And it turns out it's a hard coded limitation *if you define it on the property sheet*. See AddProperty Method in the help file. I've tried to trick VFP into making something larger but it doesn't work.
But the Comment and Tag properties of VFP objects can be as large as you like (within reason), but these are predefined. The AddProperty() function also doesn't have that limitation. Yes, you can use the AddProperty() function on an existing property but the Access method fires before the redefinition and it gets ugly.
In this specific example the Chilkat property was named "P". So the VFP property with the Access/Assign methods was named "P_VFP" but wrote the value to the "P" property (with no Access/Assign methods). In the Init method of the object I AddProperty() the existing "P" property out to 260 characters.
And it works, though it's not as clean as one would like...
But now think of the size of some web pages, binary file contents, and so forth. I need to either come up with a cleaner solution or make a second pass and ripple this idea through more character and binary data.
Bill Anderson
On Mon, Aug 1, 2022 at 2:01 PM Bill Anderson billand88@gmail.com wrote:
Paul,
Well, I can report that the wrapper coding was finished over the weekend.
There's still lots to do. There's about a dozen classes to review and a bunch of how-to-use documentation to write. But I've finally got my arms fully around it. Took 7 months to put together.
It's....big. The VCT is approaching 21MB, of which a vast majority is Chilkat's own documentation.
I'd say "soon" but my development laptop is getting repaired and who knows what'll happen there, etc. I'd guess it's about a month away.
Bill Anderson
On Mon, Jul 11, 2022 at 11:44 AM Paul H. Tarver paul@tpcqpc.com wrote:
Sounds very interesting. Do you have some ETA in mind for selling/releasing the tool?
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Bill Anderson Sent: Saturday, July 09, 2022 7:05 PM To: profoxtech@leafe.com Subject: Re: Need Help - Foxpro & Chilkat & Rest API
A Foxpro wrapper would be too much to hope for, but that would be even
better if it is exists.<<
It exists, you haven't seen it yet. I'm working on a VFP tool that wraps *everything* in the Chilkat library. Over halfway done. There's 103 classes (1 deprecated) and I've wrapped maybe 61 of them?
I too experienced *exactly* what you experienced re: Chilkat. The upside
They do document well. The downside? They document well. It's all on one web page per class and hard to see the big picture. To their defense, I don't necessarily have a better way to display such information on the web.
Rest is one of the classes I've wrapped, FWIW but that may not necessarily help clarify your issue. If you think it might, just send me an email - or I'll take a look at it.
If I complete the wrapping I may do something similar with their example code.
Bill Anderson
On Sat, Jul 9, 2022 at 10:46 AM Paul H. Tarver paul@tpcqpc.com wrote:
I have a spec project where I need to build an application using a REST
API
to extract data elements and then post those data elements to a
different
system. The API requires me to get a token upfront (which has a
five-minute
life span), issue my requests with the token and then get the results
back
in a JSON or XML format. Based on recommendations I received at the
Virtual
FoxFest earlier this year, I purchased the Chilkat tools and dove into
what
has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for
me to
understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be
able to
get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get
the
token.
My question is this: Does anyone have any sample Foxpro code they use
for a
similar process (Request a token, then make requests with the token)
using
the Chilkat tools they would be willing to share? A Foxpro wrapper
would be
too much to hope for, but that would be even better if it is exists.
I've
got to get to a point where I'm beyond this initial stage to prove I
can
make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Hi Paul
I use Chilkat a lot to grab data from API's, a lot using OAuth and the expiring token. Are you able to share the code that's getting you to the 400 response so I can see where your upto?
Regards
Chris
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul H. Tarver Sent: 09 July 2022 18:45 To: profoxtech@leafe.com Subject: Need Help - Foxpro & Chilkat & Rest API
I have a spec project where I need to build an application using a REST API to extract data elements and then post those data elements to a different system. The API requires me to get a token upfront (which has a five-minute life span), issue my requests with the token and then get the results back in a JSON or XML format. Based on recommendations I received at the Virtual FoxFest earlier this year, I purchased the Chilkat tools and dove into what has turned out to be the deep end without knowing how to swim. The documentation at Chilkat while extensive is almost too extensive for me to understand exactly what I've got to do to make this work.
So far, I've been unable to even get a token back. All I seem to be able to get back from the server is
400 Bad request
Your browser sent an invalid request.
That response has been less than helpful. I've reached out to the API Provider but their answers are focused on requests issued after I get the token.
My question is this: Does anyone have any sample Foxpro code they use for a similar process (Request a token, then make requests with the token) using the Chilkat tools they would be willing to share? A Foxpro wrapper would be too much to hope for, but that would be even better if it is exists. I've got to get to a point where I'm beyond this initial stage to prove I can make this work.
Help! I know this is possible, but so far, I'm not making much headway.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]