Bitcoin Forum
December 18, 2017, 07:55:52 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: [REVIEW] Name lookup branch (bitcoind send genjix@fishysnax.com 99999)  (Read 7181 times)
Luke-Jr
Legendary
*
expert
Offline Offline

Activity: 2282



View Profile
March 12, 2011, 05:58:51 AM
 #21

Usernames are case insensitive and can contain any character.
Why not leave that up to the server to decide?
The POST queries return a JSON. If there's a key by the name of "status" then it was successful and the value will give you an update as to what occured. If there's a key called "error" then it was unsuccessful and the value is an error message. The JSONs can also have other entries depending.
Is there a reason not to return either a 302 Found pointing to a bitcoin: URI, or else a standard HTTP error? I don't see why this needs JSON at all...

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
genjix
Legendary
*
expert
Offline Offline

Activity: 1232


View Profile
March 12, 2011, 06:18:34 AM
 #22

The HTTP error codes are encoded into the JSON. But there are other errors like wrong username/password combination or status updates like new address added. You can't use HTTP header codes for those.
Luke-Jr
Legendary
*
expert
Offline Offline

Activity: 2282



View Profile
March 13, 2011, 01:09:12 AM
 #23

The HTTP error codes are encoded into the JSON. But there are other errors like wrong username/password combination or status updates like new address added. You can't use HTTP header codes for those.
Sure you can. 401 and 200-202 look appropriate.

genjix
Legendary
*
expert
Offline Offline

Activity: 1232


View Profile
April 21, 2011, 11:02:28 AM
 #24

New thread: http://bitcointalk.org/index.php?topic=5938.0
Pages: « 1 [2]  All
  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!