-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
When I add .stale(.OK) as query parameter I get status code 400 back.
I am using Kitura NIO
There are two things I had to do to fix it:
1 Change to lowercase ok:
/// Indicates when to update.
public enum StaleOptions {
/// CouchDB will not refresh the view even if it is stale.
case ok
/// CouchDB will update the view after the stale result is returned.
case updateAfter
}instead of case OK
2: Remove \" ... \" from to string switch:
for param in params {
switch param {
case .conflicts (let value):
paramString += "conflicts=\(value)&"
…
case .stale (let value):
paramString += "stale=\(value)&"
case .startKey (let value):
…
}
}instead of paramString += "stale=\"\(value)\"&"
Metadata
Metadata
Assignees
Labels
No labels