I created a small tool to calculate the cost of HTTPS outcalls this weekend. You can either provide a URL and determine the size of the request and response (Request Simulation) or you can define the request and response size manually (Slider Calculator).
The Request Simulation will also show you the cost if you don’t set max_response_bytes and the max response size of 2MB will be assumed and charged. It clearly shows the importance of setting the max_response_bytes to an appropriate value if the response is small.
Besides the fact that I’m obviously biased because it runs on Juno (), it’s a really cool tool!
When I implemented HTTP outcalls, I learned about their costs through trial and error. It’s great to be able to get a sense of what it will cost in advance. This and other upcoming calculators are, in my opinion, a great resource and a must for the developer community building projects.
Awesome tool! One small feature request would be the ability to add a number of headers to the request.
Btw, I think pricing for https calls should be based on what is produced by the a transformation function that strips unwanted html tags (stuff like …).
Thanks a lot David. Although I’ve only scratched the surface of Juno with this little app it was a breeze working with it. The platform and cli are super thoughtful.
Thanks Giles. I allowed headers only for POST requests, but you’re right sometimes you need it also for GET requests. Added.
There are internal discussions about this (and about the need to set max_response_bytes and not just get refunded). The issue with paying only for the transformed response is that an attacker could request GBs of data and strip out all or most of it. But I think we’ll move in this direction with some safety guards in place.