Skip to content

Commit

Permalink
Fixing "?" added at the end of GET request without params
Browse files Browse the repository at this point in the history
  • Loading branch information
s4cha committed Nov 28, 2021
1 parent 8792ccd commit bfb1e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Networking/NetworkingRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ public class NetworkingRequest: NSObject {

private func getURLWithParams() -> String {
let urlString = baseURL + route
if params.isEmpty { return urlString }
guard let url = URL(string: urlString) else {
return urlString
}

if var urlComponents = URLComponents(url: url ,resolvingAgainstBaseURL: false) {
var queryItems = urlComponents.queryItems ?? [URLQueryItem]()
params.forEach { param in
Expand Down

0 comments on commit bfb1e8b

Please sign in to comment.