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 8994915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:31:46+00:00 2026-06-15T23:31:46+00:00

I am trying to make REST call to Fusion Table API . I am

  • 0

I am trying to make REST call to Fusion Table API . I am using spring Template for REST

When i am defining my URL as :

String URI = "https://www.googleapis.com/upload/fusiontables/v1/tables/tableid/import";

Exception :

 Exception in thread "main" org.springframework.web.client.HttpClientErrorException: 401 Unauthorized

which is fine and means that its hitting google server .

But when i use :

URL  :String URI = "https://www.googleapis.com/upload/fusiontables/v1/tables/tableid/import"+"&Authorization:""&Content-Type: application/octet-stream";

its throwing execption :

Exception in thread "main" org.springframework.web.client.HttpClientErrorException: 404 Not Found

Which I am not able to comprehend .

  • 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-06-15T23:31:47+00:00Added an answer on June 15, 2026 at 11:31 pm

    You are appending the request headers to your URL string, which is incorrect. These two headers:

    • Authorization: “”
    • Content-Type: application/octet-stream

    Should not be added to the request URL. Instead, if your using Apache HttpComponents:

    final HttpPost post = new HttpPost();
    post.addHeader("Authorization", "");
    post.addHeader("Content-Type", "application/octet-stream");
    

    Or alternatively, with HttpUrlConnection:

    conn.setRequestProperty("Authorization", "");
    conn.setRequestProperty("Content-Type", "application/octet-stream");
    

    Or alternatively, with Spring RestTemplate:

    HttpHeaders headers = new HttpHeaders();
    headers.add("Authorization", "");
    headers.add("Content-Type", "application/octet-stream");
    HttpEntity<String> entity = new HttpEntity<String>(helloWorld, headers);
    

    There’s a ton of information on Spring specific options on their documentation pages for RestTemplate and HttpEntity.

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

Sidebar

Related Questions

I am trying to make a simple rest api with rails using the respond_with
I am trying to make my spring-hibernate project also available for my jersey rest
I'm basically trying to make a REST call to the artifactory to get json
I am trying to make a very basic REST call to my MVC 3
I'm trying to upload an xml file to Artifactory using their Deploy api call.
I'm trying to make a GET call using flickr.photos.getInfo method from an app. Goal
Im trying to make a REST api work with VB.NET (http://help.cj.com/en/web_services/web_services.htm#Commission_Detail_Service.htm) This is CJ
I'm trying to make a 5 by 10 table using a double array. The
ANSWER: The problem is that I am trying to make a cross-domain call using
I am trying to make a REST request to a Neo4j instance hosted via

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.