HTTP multipart requests

I’m trying to batch a bunch of calls to the Google GMAIL API, as it is very slow retrieving the contents of a list of messages one at a time, but this requires me to send a request with the content-type: multipart/mixed, which as far as I’m aware is not supported by the anvil.http.request function.
Is this doable using anvil? or is there another way I batch GMAIL API calls in anvil?

Cheers,
Mat

1 Like

Looking into it a bit more, it seems that the requests library is available on the server for paid subscriptions.

Does this mean that there won’t be support for multipart HTTP messages on the free version?

Hi @matyoung89 and welcome to the forum.

You can always use an uplink script if you need packages that either anvil doesn’t support, or if you’re on the free version and require packages.

There’s are good reasons why anvil doesn’t support packages on the free tier - here’s a link to a talk that discusses it.

Thanks for the welcome sc549! :slight_smile:

Definitely understand the restrictions on custom packages for the free tier.
My original question was more towards why anvil.http.request is lacking some of the functionality (namely sending multipart request) that some of the other http libraries (like requests) support and was concerned that because requests is supported in the paid tiers, there would be no motivation to add extra functionality to anvil.http.requests.

I mean of course I understand that having a free tier at all is a luxury, but it’s just going to be a shame if I can’t batch my calls to the gmail API.

Cheers,
Mat