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
When passing an object as a parameter to a cloud endpoint, it passes it as a payload and the app engine can't interpret it. However if you send each item of the object separately it works just fine.
public String photoName;
public String photoUrl;
public String albumName;
public int photoNumber;
public String photoThumbnail;
public boolean isFavorite;
public String ownerId;
public String photoId;
public Key photoKey;
The code that only sends the user and sends the photo object as a payload(which doesnt work):
var photoApi = document.getElementById('photoApi');
var request = photoApi.api.setFavorite({
user: gapi.auth2.getAuthInstance().currentUser.get().getId(),
photo: _photo
});
When passing an object as a parameter to a cloud endpoint, it passes it as a payload and the app engine can't interpret it. However if you send each item of the object separately it works just fine.
Example:
The endpoint method
The photo object:
The code that only sends the user and sends the photo object as a payload(which doesnt work):
The code that works:
Is this expected behavior?
The text was updated successfully, but these errors were encountered: