RE: How To Interact With The Hive Blockchain Using REST APIs

avatar

You are viewing a single comment's thread:

Axios is the way to go :)

This is exactly what hive-js does under the hood. Just coverts your request to this format and then returns the data. It's similar when broadcasting too, signs your transaction, then converts it to a request and then submits it.



0
0
0.000
4 comments
avatar

Axios is the way to go :)

Axios would've added some more to the dreaded bundle size lol.

I know, but the fact still remains that using hive-js would've doubled my bundle size and that too for just one operation. I'd gladly use these libraries but in my current use case, using a library for just one request seemed overkill.

0
0
0.000
avatar

Axios would've added some more to the dreaded bundle size lol.

Yea, thats true. Web dev sucks because of that, at least on the backend I don't have to worry so much about the size of npm modules since its a install once thing(though minimal dependencies is better for many reasons).

0
0
0.000
avatar

Needing to care about dependency size is just one of the things on a long list that makes web dev so annoying.

0
0
0.000
avatar

Just write everything yourself, no need for anything extra then :P

0
0
0.000