You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use moya 15 to do network jobs.
And I need send a http request with json but I use the Charles to get the http package and find that no body.
public var task: Task {
switch self {
case let .loginGetSMS(phone):
var params = [String: Any]()
params["phone"] = phone
var urlParams = [String: Any]()
urlParams["phone"] = phone
I use moya 15 to do network jobs.
And I need send a http request with json but I use the Charles to get the http package and find that no body.
// return .requestParameters(parameters: params, encoding:JSONEncoding.default)
return .requestCompositeParameters(bodyParameters: params,
bodyEncoding: JSONEncoding.default,
urlParameters: [:])
.....
I use these two ways to send both no use.
But when I change the encoding from JSONEncoding to URLEncoding server can see the body but not json
The text was updated successfully, but these errors were encountered: