Provide basic HTTP headers including status code and content-type#23
Provide basic HTTP headers including status code and content-type#23sticktrk wants to merge 1 commit into
Conversation
The purpose of this pull request is to specify some appropriate HTTP headers - mainly `HTTP/1.1 400 Bad Request` and `HTTP/1.1 200 OK` and show them in the examples. Also explicitly expressing `Content-Type: application/json;`
|
If wallets begin to rely on this to determine what to do with the response they will break because many of the existing services already return 200 for errors. They should then check for both I think instead there should be a note on HTTP status codes: "It shouldn't matter. Just return 200. We're bypassing HTTP conventions here to create something much better." |
Existing wallets will not break, they will disregard the status code as they do now (if they are following spec)
There is no ambiguity with a HTTP status code. The current implementation has Example: BlueWallet expects case sensitive where as almost every other supporting wallet supports case insensitive. In my experience with web dev, this is not a situation where case should matter - as the interpreting language method of string compare can vary. Or maybe this is all because PHP has disambiguation issues :P |
HTTP/1.1 400 Bad RequestandHTTP/1.1 200 OKand show them in the examples.Content-Type: application/json;