File tree Expand file tree Collapse file tree
Tests/FTAPIKitTests/Mockups Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ public protocol Endpoint {
1717
1818 var headers : [ String : String ] { get }
1919
20- var query : [ String : String ] { get }
20+ var query : KeyValuePairs < String , String > { get }
2121
2222 /// HTTP method/verb describing the action.
2323 var method : HTTPMethod { get }
2424}
2525
2626public extension Endpoint {
2727 var headers : [ String : String ] { [ : ] }
28- var query : [ String : String ] { [ : ] }
28+ var query : KeyValuePairs < String , String > { [ : ] }
2929 var method : HTTPMethod { . get }
3030}
3131
@@ -42,7 +42,7 @@ public protocol MultipartEndpoint: Endpoint {
4242}
4343
4444public protocol URLEncodedEndpoint : Endpoint {
45- var body : [ String : String ] { get }
45+ var body : KeyValuePairs < String , String > { get }
4646}
4747
4848/// Endpoint protocol extending `Endpoint` having decodable associated type, which is used
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ struct URLRequestBuilder<S: URLServer> {
5151 }
5252 }
5353
54- private func queryItems( parameters: [ String : String ] ) -> [ URLQueryItem ] {
54+ private func queryItems( parameters: KeyValuePairs < String , String > ) -> [ URLQueryItem ] {
5555 parameters. compactMap { key, value in
5656 guard let encodedKey = key. addingPercentEncoding ( withAllowedCharacters: . urlQueryNameValueAllowed) ,
5757 let encodedValue = value. addingPercentEncoding ( withAllowedCharacters: . urlQueryNameValueAllowed) else {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ struct TestMultipartEndpoint: MultipartEndpoint {
7878struct TestURLEncodedEndpoint : URLEncodedEndpoint {
7979 let path = " post "
8080 let method : HTTPMethod = . post
81- let body : [ String : String ] = [
81+ let body : KeyValuePairs < String , String > = [
8282 " param1 " : " value1 " ,
8383 " param2 " : " value2 "
8484 ]
You can’t perform that action at this time.
0 commit comments