Hi All,
-- I would like to use:
or something like it to download the file into a Smalltalk program as a big string. I have used: in the past and it works great. I think the problem has something to do with the 'https:' which is different than the 'http:'. Any ideas? It does seem to get a response but no data. I have also tried #fetchForPeerIdViolation: but it seems to hang loading a DLL. Thanks in advance. Lou You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Lou,
-- What version of the product? What version of OpenSSL libraries are you using? - Seth On Wednesday, July 12, 2017 at 3:20:18 PM UTC-4, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Try
-- 'https://treasurydirect.gov/xml/CPI_20170614.xml' sstAsUrl fetch instead. Or | client result | client := SstHttpClient forTransportScheme: 'httpsl'. client startUp. [result := (client get: 'https://treasurydirect.gov/xml/CPI_20170614.xml') basicContents asString] ensure: [client shutDown] would also work On Wednesday, July 12, 2017 at 3:56:53 PM UTC-4, Seth Berman wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Seth,
-- Thanks.
Is there any reason to use your second suggestion? Like cleaning up after an error? Lou On Wednesday, July 12, 2017 at 4:12:59 PM UTC-4, Seth Berman wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Lou,
-- My second suggestion is pretty much what SstHttpUrl>>fetch does. I really just wanted to show the modified version of what you were trying to use. SstHttpUrl>>fetch actually does error checking on the fetch and content string retrieval. My SstHttpClient example doesn't. SstHttpClient is nicer if you plan to reuse it for more than 1 call (and perhaps customize) since you are not forced to do startUp/shutDowns between every call you would make (which is what SstHttpUrl>>fetch does). -- Seth On Wednesday, July 12, 2017 at 5:54:08 PM UTC-4, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Seth,
-- Thanks. Tomorrow I will play with the second version to handle the case when the file isn't present. The government creates the file once a month around the middle of the month. I have to guess at the date/name to get the latest version for the file. That's shouldn't be a problem, I just need to play with what comes back and get the string when it is good. I will post what I end up with when done. Lou On Wednesday, July 12, 2017 at 6:04:12 PM UTC-4, Seth Berman wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Seth,
-- For testing I rearranged your example as such:
on error, say the URL points to a non existent file, the error is ignored. If the file is present, I save it to disk. I won't actually do that later but for testing it is great. Thanks again. Lou On Wednesday, July 12, 2017 at 7:45:59 PM UTC-4, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |