Bitcoin Forum
May 14, 2024, 04:59:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [REVIEW] Name lookup branch (bitcoind send genjix@fishysnax.com 99999)  (Read 7398 times)
Luke-Jr
Legendary
*
expert
Offline Offline

Activity: 2576
Merit: 1186



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...

genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


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: 2576
Merit: 1186



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 (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!