Bitcoin Forum
November 19, 2017, 07:35:04 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: groovy - access wallet over JSON  (Read 1289 times)
berlinguyinca
Newbie
*
Offline Offline

Activity: 7


View Profile
July 13, 2011, 04:22:43 AM
 #1

hi,

I have a short question. I'm trying since 2-3 days now to access my local wallet using groovy and I'm sadly failling at this and running out of idea's by now. Does anybody has a simple groovy client?

I always get the error message: 'internal server error' without any details what is actually wrong.

my cleint:

Code:
  def authSite = new HTTPBuilder('http://127.0.0.1:8332/',JSON)
        authSite.auth.basic 'username', 'password'

        authSite.get(path: 'getbalance',
                query: [:]) { resp, json ->

            println resp.status

            json.each {  // iterate over JSON 'status' object in the response:
                println it
            }
        }


if I use the bitcoind tool on the command line, it works fine. So I'm sure the daemon is running.

thanks,

g.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511076904
Hero Member
*
Offline Offline

Posts: 1511076904

View Profile Personal Message (Offline)

Ignore
1511076904
Reply with quote  #2

1511076904
Report to moderator
1511076904
Hero Member
*
Offline Offline

Posts: 1511076904

View Profile Personal Message (Offline)

Ignore
1511076904
Reply with quote  #2

1511076904
Report to moderator
TeraPool
Jr. Member
*
Offline Offline

Activity: 42


View Profile
July 13, 2011, 05:41:42 PM
 #2

Never worked with or even heard of Groovy, sorry.

Why don't you try to implement some of the simple PHP peices of code available out there? https://en.bitcoin.it/wiki/PHP_developer_intro

berlinguyinca
Newbie
*
Offline Offline

Activity: 7


View Profile
July 13, 2011, 06:21:21 PM
 #3

Never worked with or even heard of Groovy, sorry.

Why don't you try to implement some of the simple PHP peices of code available out there? https://en.bitcoin.it/wiki/PHP_developer_intro

Because I really dislike php/perl and this script is going to be included in a grails based application. Which means it needs to run on the jam. So groovy/scala/java it is. And there is sadly not a single fully documented java example on the bit coin site as far as I can see.
willphase
Hero Member
*****
Offline Offline

Activity: 770


View Profile
July 14, 2011, 08:58:18 PM
 #4

Never worked with or even heard of Groovy, sorry.

Why don't you try to implement some of the simple PHP peices of code available out there? https://en.bitcoin.it/wiki/PHP_developer_intro

Because I really dislike php/perl and this script is going to be included in a grails based application. Which means it needs to run on the jam. So groovy/scala/java it is. And there is sadly not a single fully documented java example on the bit coin site as far as I can see.

there is a complete Java bitcoin client here:

http://code.google.com/p/bitcoinj/

Possible you're using the wrong auth method in your code... but I'm totally unfamiliar with 'Groovy'.

Will

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!