Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6823683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:48:42+00:00 2026-05-26T21:48:42+00:00

I am doing a system that imports live data from Fusion tables. I am

  • 0

I am doing a system that imports live data from Fusion tables.

I am using C# in Unity3D so, I don’t have the WebRequest from .NET framework.

However, Unity3D has WWW and WWWForm and I am trying to use those to query Fusion Tables.
I already have the Authentication Token but the SQL injection API is returning a 411 page requesting Content-Length.

I already added that to the headers, but still, no change…

Bellow i am posting the code for the Query Test, it assumes valid authentication in Fusion Tables

public string Execute(string query) {

    string result;

    var url_fusion_tables = "https://tables.googlelabs.com/api/query/?";

    WWWForm postdata = new WWWForm();

    System.Collections.Hashtable headers = postdata.headers;

    headers["Method"] = "POST";
    headers["Content-Type"] = "applicaton/x-www-form-urlencoded";

    string header_token = string.Format("GoogleLogin auth = {0}", token);
    headers["Authorization"] = header_token;

    var sb = new StringBuilder();
    sb.Append("sql=");
    sb.Append(WWW.EscapeURL("SHOW TABLES"));

    var data = Encoding.ASCII.GetBytes(sb.ToString());
    headers["Content-Length"] = data.Length;

    WWW reqClient = new WWW(url_fusion_tables, data, headers);

    StartCoroutine(WaitForQuery(reqClient));

    return null;

}

IEnumerator WaitForQuery(WWW www) {

    yield return www;

    if (www.error == null) {

        //Debug.Log("Success");
        Debug.Log("Received :: " + www.text);


    } else {
        Debug.Log("Query WWW error : "+ www.error);
    }
}

Hope anyone can help.

Thanks in advance.

Due to Kathryn’s help i have edited the Execute function to the following:

    public void Execute(string query) {
    //in query : SHOW TABLES

    var sql = string.Format("sql={0}", WWW.EscapeURL(query));
    var url_fusion_tables = "https://www.google.com/fusiontables/api/query?";

    WWWForm postdata = new WWWForm();


    System.Collections.Hashtable headers = postdata.headers;

    headers["AllowAutoRedirect"] = true;
    headers["AllowWriteStreamBuffering "] = true;
    headers["Method"] = "GET";
    headers["Content-Type"] = "applicaton/x-www-form-urlencoded";

    string header_token = string.Format("GoogleLogin auth = {0}", token);
    headers["Authorization"] = header_token;

    var data = Encoding.ASCII.GetBytes(sql);
    headers["Content-Length"] = data.Length;

    WWW reqClient = new WWW(url_fusion_tables, data, headers);

    StartCoroutine(WaitForQuery(reqClient));

}

I’m still receiving 411 response

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:48:42+00:00Added an answer on May 26, 2026 at 9:48 pm

    I finally resolved the problem…

    As i said before, the 411 was returned because the token string i passed to the authentication header had a new line tag in it, so the server would interpret that as the end of the Header on the POST. Removing the \n at the end of the string results in a good request.

    The next problem was due to a bad query, my mistake on putting the wrong Table ID.

    Thanks Kathryn for your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VB.NET singleton class which implements Serializable : Imports System.IO Imports System.Runtime.Serialization
I am doing some maintenance work on an older system that is running PHP
I am currently doing some kind of reporting system.the figures, tables, graphs are all
Can someone check my .NET code that I have in an InfoPath button to
I have a process that imports a daily file of product registrations, and adds
I have a map in BizTalk 2009 that is converting some data into an
I have a system that writes a XML file. The problem is that I
I'm doing a system where the pages are displayed by tabs (easytabs Plugin http://os.alfajango.com/easytabs/#tabs1-js
While I was doing some reading on system calls, I did a search for
We are doing some big changes in our system and I'd like to know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.