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

  • Home
  • SEARCH
  • 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 8109597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:28:24+00:00 2026-06-06T01:28:24+00:00

I am trying to use to a PUT call to a API using JSON.

  • 0

I am trying to use to a PUT call to a API using JSON. I am using jQuery and from what I can tell my code looks right:

<script type="text/javascript">
    $(document).ready(function () {
        $.ajax({
            url: 'https://app.clickdimensions.com/Service.svc/v1/account/accountIdHere/capture',
            type: 'PUT',
            data: { 'reg_FirstName': 'First',
                    'reg_LastName': 'Last',
                    'reg_Phone': '123-342-1211',
                    'reg_Email': 'email@email.com',
                    'reg_Company': 'My Company',
                    'reg_Address1': '123 Traffic Lane',
                    'reg_Address2': '',
                    'reg_City': 'Atlanta',
                    'reg_State': 'GA',
                    'reg_Zip': '12232',
                    'reg_Country': 'United States'  
            },
            success: function() { alert('PUT completed'); }
        });
    });
</script>

But when I run it I get the following error:

XMLHttpRequest cannot load https://app.clickdimensions.com/Service.svc/v1/account/accountIdHere/capture. Origin http://localhost:65116 is not allowed by Access-Control-Allow-Origin.

I’ve looked everywhere and tried about everything I can find to no avail. So I’m thinking my code might be wrong to do a JSON PUT call. Does my code look wrong? If so how could I fix it. If not, any idea on that error?

Thanks!

  • 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-06T01:28:26+00:00Added an answer on June 6, 2026 at 1:28 am

    Your code is correct, however it is not possible to do a PUT request cross-domain unless the domain you are requesting data from is returning the proper CORS headers.

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

Sidebar

Related Questions

I'm trying to use Google's Images API to search an image and put it
I am using C# in Mono and I'm trying to use pinvoke to call
I'm learning Scala and trying to use javax.cache in Scala code and can't find
Im trying to use this jQuery script and this is confusing me: function CallService()
I am trying to use an API that returns the following structure <TwilioResponse> <Call>
I am attempting to use the jQuery $.ajax call to return xml from a
I am trying to use ZipInputStream to put each file inside the archive in
Im trying to use Nets/HTTP to use POST and put in a custom user
I am trying to use IO.popen in order to put (with .puts method) and
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The

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.