By response, I mean, for example, for if I request a user's info, then the server should give me a response of the user's info or a response of why the server refuses/fail to get the user's info.
So you need to know what response the server gives when the registry is complete.
And then you can parse it into an object that we can use in the app using JSONDecoder.
(e.g. parse from data to a user's info. Data -> UserInfo)
Post
Replies
Boosts
Views
Activity
I addedrequest.httpBody = try! JSONSerialization.data(withJSONObject: parametrs) instead of request.httpBody = parameters.percent Encoded()
I fixed it
struct PatientDetail: View {
private let patient: HastaViewModel
var body: some View {
VStack {
Form {
Section(header: Text("Kişisel Bilgiler")) {
Text("\(patient.ad)")
Text("\(patient.soyad)")
Text("\(patient.phone)")
Text("\(patient.email)")
Text("\(patient.dogumyili)")
Text("\(patient.ulke)")
Text("\(patient.sehir)")
Text("\(patient.ilce)")
Text("\(patient.adres)")
Text("\(patient.tcno)")
}
}
}
}
So that you only show one user/patient instead of a list of users.
And then call it from the main view like
List {
ForEach(patientVM.hastalar, id: \.id){ patient in
NavigationLink {
PatientDetail(patient: patient)
} label: {
VStack(alignment: .leading) {
Text(patient.ad)
Text(patient.email).font(.caption).foregroundColor(.gray)
}
}
Please select another role(developer,app marketing)
If you can show screenshots I can try to help. Did the email address you are trying to add create an account on app store connect before?
Thank you