Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
How do i hide request API URL on browser debugging tool at network tab while ajax call?

I want to send a secure request to the targeted API endpoint and don't want to let the browser to track the requested API URL in browser debugging tool. Is there any way to decode the API requested URL so that the URL will not be shown in the browser debugger network tab?

I am using pyton django framework.

Ajax

function Approve(camp_id, updated)
{
    if (updated === 1){
    var payload = {'campaign_status': 5}
    }
    else{
    var payload = {'campaign_status': 1}
    const  token = '{{csrf_token}}';
    }
    $.ajax(
        {
          url: `https://api.example.com`,
            
            data:{
                camp_id:camp_id
            }
            type:"PUT",
              headers:{"Authorization": `Bearer ${token}`,, "csrfmiddlewaretoken": token },
            contentType: "application/json",
            data: JSON.stringify(payload),

            success: function(response, xhr)
            {
                window.location.reload();
            },
            error: function(response, xhr)
            {
                console.log(response)
            }
        }
    );
}

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

i have solved this problem by handling my api call via django view, rather than with ajax, final code will look like

Ajax:

function Approve(camp_id, updated)
{
    if (updated === 1){
    var payload = {'campaign_status': 5}
    }
    else{
    var payload = {'campaign_status': 1}
    const  token = '{{csrf_token}}';
    }
    $.ajax(
        {
          url: `approve/edit`,// django view url
            
            data:{
                camp_id:camp_id
            }
            type:"PUT",
              headers:{"Authorization": `Bearer ${token}`,, "csrfmiddlewaretoken": token },
            contentType: "application/json",
            data: JSON.stringify(payload),

            success: function(response, xhr)
            {
                window.location.reload();
            },
            error: function(response, xhr)
            {
                console.log(response)
            }
        }
    );
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!