Commit 29bfbad5 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Use http.MethodGet and friends

parent 8e204c02
...@@ -121,12 +121,12 @@ func HandleProtocolMessage( ...@@ -121,12 +121,12 @@ func HandleProtocolMessage(
// Route to handler // Route to handler
switch len(verb) { switch len(verb) {
case 0: case 0:
if method == "DELETE" { if method == http.MethodDelete {
session.handleDelete() session.handleDelete()
status = http.StatusOK status = http.StatusOK
return return
} }
if method == "GET" { if method == http.MethodGet {
h := http.Header(headers) h := http.Header(headers)
min := &irma.ProtocolVersion{} min := &irma.ProtocolVersion{}
max := &irma.ProtocolVersion{} max := &irma.ProtocolVersion{}
...@@ -144,7 +144,7 @@ func HandleProtocolMessage( ...@@ -144,7 +144,7 @@ func HandleProtocolMessage(
status, output = responseJson(nil, session.fail(irmaserver.ErrorInvalidRequest, "")) status, output = responseJson(nil, session.fail(irmaserver.ErrorInvalidRequest, ""))
return return
default: default:
if method != "POST" { if method != http.MethodPost {
status, output = responseJson(nil, session.fail(irmaserver.ErrorInvalidRequest, "")) status, output = responseJson(nil, session.fail(irmaserver.ErrorInvalidRequest, ""))
return return
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment