Re: [Mojolicious] Re: Mojolicious not completing large requests from Google Contacts API

2018-09-12 Thread Dan Book
For future reference, ->body is exactly equivalent to
->content->asset->slurp, except that it also handles multipart bodies.

-Dan

On Wed, Sep 12, 2018 at 6:21 PM Steve Dondley  wrote:

> I was able to retrieve the content with $res->content->asset->slurp;
>
> I'm not familiar with how to get a json response with the Contacts API.
> Will have to research. Thanks for the tip.
>
> On Wednesday, September 12, 2018 at 6:17:13 PM UTC-4, Dan Book wrote:
>>
>> There should be no visible difference if you are retrieving the content
>> with methods like ->body ->text or ->json.
>>
>> -Dan
>>
>> On Wed, Sep 12, 2018 at 6:07 PM Steve Dondley  wrote:
>>
>>> So I took a closer look at the response object returned. Looks like for
>>> smaller queries the response is stored in memory and for larger queries the
>>> response is stuffed into a temporary file, as far as I can tell. How do I
>>> get access to this file and where is it?
>>>
>>> On Wednesday, September 12, 2018 at 5:57:43 PM UTC-4, Steve Dondley
>>> wrote:

 I'm using Google's Contact API to download all my contacts. There are
 probably several thousand contacts. I'm using the  Google::Moo
  perl module which uses the
 Mojolicious user agent.

 I can successfully download up to about 200 contacts with one shot but
 after that, I get a response with no content even though the response code
 is "200." I set the $ENV variable to lift max_line_size, max_buffer_size,
 etc. but it did not work.

 The limitation is not on Google's side as I can successfully get all
 contacts via their web based Oauth 2.0 playground service.

 Any ideas on what I can try to coerce Mojolicious to get the content of
 the api call with a large response?

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Mojolicious" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to mojolicious...@googlegroups.com.
>>> To post to this group, send email to mojol...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/mojolicious.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Mojolicious not completing large requests from Google Contacts API

2018-09-12 Thread Steve Dondley
OK, yup, full response comes through with json. Nice. For anyone 
experiencing the same thing, do something like this:


  my $res = Moo::Google->new()->api_query( {
  httpMethod => 'get',
  path  => 
'https://www.google.com/m8/feeds/contacts/default/full?v=3.0&start-index=1&max-results=5&alt=json',
  });


https://www.google.com/m8/feeds/contacts/default/full?v=3.0&start-index=$start_index&max-results=50

On Wednesday, September 12, 2018 at 6:20:59 PM UTC-4, Steve Dondley wrote:
>
> I was able to retrieve the content with $res->content->asset->slurp;
>
> I'm not familiar with how to get a json response with the Contacts API. 
> Will have to research. Thanks for the tip. 
>
> On Wednesday, September 12, 2018 at 6:17:13 PM UTC-4, Dan Book wrote:
>>
>> There should be no visible difference if you are retrieving the content 
>> with methods like ->body ->text or ->json.
>>
>> -Dan
>>
>> On Wed, Sep 12, 2018 at 6:07 PM Steve Dondley  wrote:
>>
>>> So I took a closer look at the response object returned. Looks like for 
>>> smaller queries the response is stored in memory and for larger queries the 
>>> response is stuffed into a temporary file, as far as I can tell. How do I 
>>> get access to this file and where is it?
>>>
>>> On Wednesday, September 12, 2018 at 5:57:43 PM UTC-4, Steve Dondley 
>>> wrote:

 I'm using Google's Contact API to download all my contacts. There are 
 probably several thousand contacts. I'm using the  Google::Moo 
  perl module which uses the 
 Mojolicious user agent.

 I can successfully download up to about 200 contacts with one shot but 
 after that, I get a response with no content even though the response code 
 is "200." I set the $ENV variable to lift max_line_size, max_buffer_size, 
 etc. but it did not work.

 The limitation is not on Google's side as I can successfully get all 
 contacts via their web based Oauth 2.0 playground service.

 Any ideas on what I can try to coerce Mojolicious to get the content of 
 the api call with a large response?

>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Mojolicious" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to mojolicious...@googlegroups.com.
>>> To post to this group, send email to mojol...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/mojolicious.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Mojolicious not completing large requests from Google Contacts API

2018-09-12 Thread Steve Dondley
I was able to retrieve the content with $res->content->asset->slurp;

I'm not familiar with how to get a json response with the Contacts API. 
Will have to research. Thanks for the tip. 

On Wednesday, September 12, 2018 at 6:17:13 PM UTC-4, Dan Book wrote:
>
> There should be no visible difference if you are retrieving the content 
> with methods like ->body ->text or ->json.
>
> -Dan
>
> On Wed, Sep 12, 2018 at 6:07 PM Steve Dondley  > wrote:
>
>> So I took a closer look at the response object returned. Looks like for 
>> smaller queries the response is stored in memory and for larger queries the 
>> response is stuffed into a temporary file, as far as I can tell. How do I 
>> get access to this file and where is it?
>>
>> On Wednesday, September 12, 2018 at 5:57:43 PM UTC-4, Steve Dondley wrote:
>>>
>>> I'm using Google's Contact API to download all my contacts. There are 
>>> probably several thousand contacts. I'm using the  Google::Moo 
>>>  perl module which uses the 
>>> Mojolicious user agent.
>>>
>>> I can successfully download up to about 200 contacts with one shot but 
>>> after that, I get a response with no content even though the response code 
>>> is "200." I set the $ENV variable to lift max_line_size, max_buffer_size, 
>>> etc. but it did not work.
>>>
>>> The limitation is not on Google's side as I can successfully get all 
>>> contacts via their web based Oauth 2.0 playground service.
>>>
>>> Any ideas on what I can try to coerce Mojolicious to get the content of 
>>> the api call with a large response?
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mojolicious" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mojolicious...@googlegroups.com .
>> To post to this group, send email to mojol...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/mojolicious.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Mojolicious not completing large requests from Google Contacts API

2018-09-12 Thread Dan Book
There should be no visible difference if you are retrieving the content
with methods like ->body ->text or ->json.

-Dan

On Wed, Sep 12, 2018 at 6:07 PM Steve Dondley  wrote:

> So I took a closer look at the response object returned. Looks like for
> smaller queries the response is stored in memory and for larger queries the
> response is stuffed into a temporary file, as far as I can tell. How do I
> get access to this file and where is it?
>
> On Wednesday, September 12, 2018 at 5:57:43 PM UTC-4, Steve Dondley wrote:
>>
>> I'm using Google's Contact API to download all my contacts. There are
>> probably several thousand contacts. I'm using the  Google::Moo
>>  perl module which uses the
>> Mojolicious user agent.
>>
>> I can successfully download up to about 200 contacts with one shot but
>> after that, I get a response with no content even though the response code
>> is "200." I set the $ENV variable to lift max_line_size, max_buffer_size,
>> etc. but it did not work.
>>
>> The limitation is not on Google's side as I can successfully get all
>> contacts via their web based Oauth 2.0 playground service.
>>
>> Any ideas on what I can try to coerce Mojolicious to get the content of
>> the api call with a large response?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious not completing large requests from Google Contacts API

2018-09-12 Thread Steve Dondley
So I took a closer look at the response object returned. Looks like for 
smaller queries the response is stored in memory and for larger queries the 
response is stuffed into a temporary file, as far as I can tell. How do I 
get access to this file and where is it?

On Wednesday, September 12, 2018 at 5:57:43 PM UTC-4, Steve Dondley wrote:
>
> I'm using Google's Contact API to download all my contacts. There are 
> probably several thousand contacts. I'm using the  Google::Moo 
>  perl module which uses the 
> Mojolicious user agent.
>
> I can successfully download up to about 200 contacts with one shot but 
> after that, I get a response with no content even though the response code 
> is "200." I set the $ENV variable to lift max_line_size, max_buffer_size, 
> etc. but it did not work.
>
> The limitation is not on Google's side as I can successfully get all 
> contacts via their web based Oauth 2.0 playground service.
>
> Any ideas on what I can try to coerce Mojolicious to get the content of 
> the api call with a large response?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Mojolicious not completing large requests from Google Contacts API

2018-09-12 Thread Steve Dondley
I'm using Google's Contact API to download all my contacts. There are 
probably several thousand contacts. I'm using the  Google::Moo 
 perl module which uses the 
Mojolicious user agent.

I can successfully download up to about 200 contacts with one shot but 
after that, I get a response with no content even though the response code 
is "200." I set the $ENV variable to lift max_line_size, max_buffer_size, 
etc. but it did not work.

The limitation is not on Google's side as I can successfully get all 
contacts via their web based Oauth 2.0 playground service.

Any ideas on what I can try to coerce Mojolicious to get the content of the 
api call with a large response?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] New IRC channel (#mojo on irc.freenode.net)

2018-09-12 Thread sri
Quick announcement: We've decided to move the official Mojolicious IRC 
channel to Freenode,
to make it easier for people from outside the Perl echo chamber to find us.

  
  
https://github.com/mojolicious/mojo/commit/db14e5226e9590868efda5de3d746364b93d1645

--
sebastian

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.