aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Behrens <me@kloenk.dev>2021-09-30 10:28:45 +0200
committerFinn Behrens <me@kloenk.dev>2021-09-30 10:28:45 +0200
commit5168c7344344958add859ade8af013e2b9279c65 (patch)
treeff15ff704cb99e8890bc4be881f10213fffa72d7
parent88baeb12a444b63856b6b6df80a049d6ea594072 (diff)
downloadMatrixCore-5168c7344344958add859ade8af013e2b9279c65.tar.gz
MatrixCore-5168c7344344958add859ade8af013e2b9279c65.tar.xz
MatrixCore-5168c7344344958add859ade8af013e2b9279c65.zip
fix HttpMethod
-rw-r--r--Sources/MatrixClient/API/HomeServer.swift4
-rw-r--r--Sources/MatrixClient/API/Login.swift4
-rw-r--r--Sources/MatrixClient/API/Logout.swift2
-rw-r--r--Sources/MatrixClient/API/Request.swift6
4 files changed, 8 insertions, 8 deletions
diff --git a/Sources/MatrixClient/API/HomeServer.swift b/Sources/MatrixClient/API/HomeServer.swift
index 379a047..557d82b 100644
--- a/Sources/MatrixClient/API/HomeServer.swift
+++ b/Sources/MatrixClient/API/HomeServer.swift
@@ -38,7 +38,7 @@ public struct MatrixServerInfoRequest: MatrixRequest {
return "/_matrix/client/versions"
}
- public static var httpMethod = HttpMethode.GET
+ public static var httpMethod = HttpMethod.GET
public static var requiresAuth = false
}
@@ -66,7 +66,7 @@ public struct MatrixWellKnownRequest: MatrixRequest {
return "/.well-known/matrix/client"
}
- public static var httpMethod = HttpMethode.GET
+ public static var httpMethod = HttpMethod.GET
public static var requiresAuth = false
}
diff --git a/Sources/MatrixClient/API/Login.swift b/Sources/MatrixClient/API/Login.swift
index a8dc015..a69ad40 100644
--- a/Sources/MatrixClient/API/Login.swift
+++ b/Sources/MatrixClient/API/Login.swift
@@ -16,7 +16,7 @@ public struct MatrixLoginFlowRequest: MatrixRequest {
return "/_matrix/client/r0/login"
}
- public static var httpMethod = HttpMethode.GET
+ public static var httpMethod = HttpMethod.GET
public static var requiresAuth = false
@@ -245,7 +245,7 @@ extension MatrixLoginRequest: MatrixRequest {
return "/_matrix/client/r0/login"
}
- public static var httpMethod = HttpMethode.POST
+ public static var httpMethod = HttpMethod.POST
public static var requiresAuth = false
}
diff --git a/Sources/MatrixClient/API/Logout.swift b/Sources/MatrixClient/API/Logout.swift
index a7ef3b1..3929469 100644
--- a/Sources/MatrixClient/API/Logout.swift
+++ b/Sources/MatrixClient/API/Logout.swift
@@ -20,7 +20,7 @@ public struct MatrixLogoutRequest: MatrixRequest {
}
}
- public static var httpMethod = HttpMethode.POST
+ public static var httpMethod = HttpMethod.POST
public static var requiresAuth = true
}
diff --git a/Sources/MatrixClient/API/Request.swift b/Sources/MatrixClient/API/Request.swift
index f269f75..9046467 100644
--- a/Sources/MatrixClient/API/Request.swift
+++ b/Sources/MatrixClient/API/Request.swift
@@ -7,7 +7,7 @@
import Foundation
-public enum HttpMethode: String, CaseIterable {
+public enum HttpMethod: String, CaseIterable {
case GET = "GET"
case POST = "POST"
case PUT = "PUT"
@@ -22,7 +22,7 @@ public protocol MatrixRequest: Codable {
associatedtype URLParameters
func path(with parameters: URLParameters) -> String
- static var httpMethod: HttpMethode { get }
+ static var httpMethod: HttpMethod { get }
static var requiresAuth: Bool { get }
// TODO: rate limited property?
}
@@ -43,7 +43,7 @@ public extension MatrixRequest {
}
urlRequest.httpMethod = Self.httpMethod.rawValue
- if HttpMethode.containsBoddy.contains(Self.httpMethod) {
+ if HttpMethod.containsBoddy.contains(Self.httpMethod) {
urlRequest.httpBody = try? JSONEncoder().encode(self)
}