-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need help for POST method #5
Comments
@Vinita18 Can you attach the log of the error please? I don't know if it's an error from your service and we need to validate that the configuration of CORS works well from the service |
Can you attach the response of your service? I need to know what's the JSON returned from your service to check if your code is correct. Closed this issue for the moment, let me know more details to reopen the issue |
@Vinita18 after reviewing with NodeJS as the Backend, we can't send anonymous objects, a Serializable class is required. Example:
Best regards, Nicholls |
Okay. Thanks. |
This is my code and I am trying to post gender = "male".
but this code is not working for me.
RestClient.Post<Models.RootObjectData> (url, new
{
gender = "male"
}, (err, res,body) => {
if (err != null) {
EditorUtility.DisplayDialog ("Error", err.Message, "Ok");
} else {
EditorUtility.DisplayDialog ("Success", JsonUtility.ToJson (body, true), "Ok");
}
});
Model Classes:
[Serializable]
public class Data
{
public int timestamp_created;
public int id;
public string gender;
public string access_token;
The text was updated successfully, but these errors were encountered: