Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Binex-UmairBhatti · Jan 25, 2016 at 10:17 AM · rotationwebglparse

Parse RestAPI in Unity WebGL build not working on Google Chrome

I am trying to integrate Parse in Unity Webgl build. As there is no specific SDK for WebGL provided by parse so for parse communication i am using RestAPI to Get the data from parse. As provided in parse help first i have created a user at the parse dashboard. Using those credentials i first login to the parse from the app using following code:

 WWWForm form = new WWWForm();
 var headers = form.headers;
 headers["X-Parse-Application-Id"] = ParseHandler.Instance.ApplicationID;
 headers["X-Parse-REST-API-Key"] = ParseHandler.Instance.RestApiKey;
 headers["Content-Type"] = "application/json";
 
 WWW www = new WWW("https://api.parse.com/1/login?username=abc&password=abcpassword", null, headers);
 yield return www;
 if (www.error != null)
 {
 isInitialized = false;
 }
 else
 {
 isInitialized = true;
 }

After login in successfully i try to get the data of specific person using following code:

 WWWForm form = new WWWForm();
 var headers = form.headers;
 headers["X-Parse-Application-Id"] = ParseHandler.Instance.ApplicationID;
 headers["X-Parse-REST-API-Key"] = ParseHandler.Instance.RestApiKey;
 headers["Content-Type"] = "application/json";
 WWW www = new WWW("https://api.parse.com/1/classes/PlayerProfile?where={\ "ID\ ":\ "20489\ "}",null,headers);
 
 if (www.error != null)
 {
 if (responseDelegate != null)
 responseDelegate(null);
 }
 else
 {
 if (responseDelegate != null)
 responseDelegate(www.text);
 }

When i open this WebGL build on Firefox after login in to facebook parse starts initializing and it works perfectly fine. It do login and get the data but when i try to Open the build on Google Chrome it gives following error and parse doesn’t able to login or get data from parse: Refused to set unsafe header "User-Agent"

Please help how can i fix this issue. As we don’t want to shift this app to webplayer as chrome doesn’t support webplayer, also it has a prerequisite of downloading unity webplayer and all our data is already maintained on parse for different platforms.

I have hosted the app at the following link : “https://www.leatherjacketmaster.com/goa/index.html”

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Binex-UmairBhatti · Jan 27, 2016 at 06:47 AM

i have done a work around because of User-Agent header error i was trying to used different User-Agent values according to forums but it was not working but i removed the User-Agent and didn't send any User-Agent it did giving error but no i am getting the response

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Binex-UmairBhatti · Feb 19, 2016 at 07:09 AM 0
Share

I am also not passing any User-Agent as you can see in my code but still i am getting error on response.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

GL_INVALID_FRAMEBUFFER WebGL using LWRP 1 Answer

Using LookAT causes no rotation at all? 1 Answer

rotation problems 0 Answers

Rotate character 0 Answers

Quaternion rotation issue please help :'( 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges