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(
// Route to handler
switch len(verb) {
case 0:
if method == "DELETE" {
if method == http.MethodDelete {
session.handleDelete()
status = http.StatusOK
return
}
if method == "GET" {
if method == http.MethodGet {
h := http.Header(headers)
min := &irma.ProtocolVersion{}
max := &irma.ProtocolVersion{}
......@@ -144,7 +144,7 @@ func HandleProtocolMessage(
status, output = responseJson(nil, session.fail(irmaserver.ErrorInvalidRequest, ""))
return
default:
if method != "POST" {
if method != http.MethodPost {
status, output = responseJson(nil, session.fail(irmaserver.ErrorInvalidRequest, ""))
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