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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:34:28+00:00 2026-05-19T17:34:28+00:00

I am making HTTP requests to a web service that requires authentication. My intiial

  • 0

I am making HTTP requests to a web service that requires authentication. My intiial request is as follows:

function getReq() {
$.ajax( {
   type: "GET",
   url: urlRequest,
   dataType: jsonp,
   cache: false,
   // success: getRates,
   error: onFaultAjaxRequest,
   timeout: DEFAULT_TIMEOUT_AJAX_REQUEST
});
}

The urlRequest contains the base address plus a querystring with my username and password. The HTTP response resulting in this request includes a session ID. This session ID is used in subsequent HTTP requests to the web service.

How do I trap the session ID using JQuery or another alternative method?

When I receive the second response with my currency data, how do I utilize JQuery CSV plugin to create an array from the data returned in CSV format?

Thanks,
Sid

Edit Based on responses thus far, here’s what I have written for my js file:

var urlRequest = "http://webrates.truefx.com/rates/connect.html?u=user&p=pass&f=html&q=dfrates"
var DEFAULT_TIMEOUT_AJAX_REQUEST = 33000; //in milisecond
var DEFAULT_TIMEOUT_AFTER_SUCCESS_REQUEST = 330; //time after succes request before next request

function getReq() {
$.ajax( {
   type: "GET",
   url: urlRequest,
   dataType: jsonp,
   cache: false,
   success: getRates,
   beforeSend: function(xhr){
            xhr.withCredentials=true;
            },
   error: onFaultAjaxRequest,
   timeout: DEFAULT_TIMEOUT_AJAX_REQUEST
});
}

function getRates(){
var tab=jXHR.getAllResponseHeaders();
}

function onFaultAjaxRequest(XMLHttpRequest, textStatus, errorThrown) {
var t = setTimeout(getReq, DEFAULT_TIMEOUT_AFTER_SUCCESS_REQUEST);
}

function onSuccessAjaxRequest(returnData) {
var obj= getReq;
var arr=$.makearray(obj);

};

My index.html page is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to MyDomain.com</title>
<script type="text/javascript" src="dist/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="dist/jquery.jqplot.js"></script>
<script type="text/javascript" src="js/dfc.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.jqplot('chartdiv'[onSuccessAjaxRequest]);
});
</script>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>

<body>
<div id="chartdiv">
</div>
</body>
</html>

When I debug index.html, I receive an error stating JScript error “No Data Specified” in the jqplot plugin. How should I remedy this situation?

Thanks much!!

  • 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-19T17:34:29+00:00Added an answer on May 19, 2026 at 5:34 pm

    I thought about something like this:

    function getReq() {
    $.ajax( {
       type: "GET",
       url: urlRequest,
       dataType: jsonp,
       cache: false,
       success: getRates,
       beforeSend: function(xhr){
               xhr.withCredentials = true;
            },
       error: onFaultAjaxRequest,
       timeout: DEFAULT_TIMEOUT_AJAX_REQUEST
    });
    }
    
    
    function getRates(data, textStatus, jXHR) {
        var tab=jXHR.getAllResponseHeaders();
        // tab is a string with headers ...
    }
    

    However, there are cross-domain and browser issues. For examle, firefox 3.5 (or jquery) seems to clear Set-Cookie field, so it’s empty in javaScript. When connecting to other domain, xhr.withCredentials=true has to be set also.

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

Sidebar

Related Questions

I'm building a web service that requires me to generate custom sessions and random
I want to invoke an ASP.NET web service via an http POST request using
I am trying to build a webservice that manipulates http requests POST and GET.
I've created a windows service that runs locally and provides a web service which
I'm building a RESTful web service that has the usual flavor of CRUD operations
Making echo of a question around the web: Is the syntax for svn:ignore patterns
I have been making a little toy web application in C# along the lines
I'm making a WinForms app with a ListView set to detail so that several
I have a wcf service that randomly begins to fail, when requesting the autogenerated
Assuming I have implement that : making my app as a server which means

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.