Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery get request with headers

$.ajax({
         url: "http://localhost/myawsomecode/",
         data: { param1: 'anyvalue', param2: 'othervalue' },
         type: "GET",
         beforeSend: function(xhr){xhr.setRequestHeader('X-Test-Header', 'SetHereYourValueForTheHeader');},
         success: function() { alert('Success!'); }
      });
Comment

PREVIOUS NEXT
Code Example
Javascript :: send file in patch axios react native 
Javascript :: how to get ip address javascript 
Javascript :: js add element to front of array 
Javascript :: reactnative get height screen 
Javascript :: react state hooks 
Javascript :: nodejs current timestamp unix 
Javascript :: javascript play audio 
Javascript :: Handle an input with React hooks 
Javascript :: check palindrome javascript 
Javascript :: insert image in react 
Javascript :: javascript to string big number 
Javascript :: jest match object properties 
Javascript :: javascript assert 
Javascript :: on hover add class on children jquery 
Javascript :: window.scroll 
Javascript :: Array.include is not a function javascript error help 
Javascript :: regex numéro de téléphone 
Javascript :: js get all indexes of value in array 
Javascript :: moment format a date into different format 
Javascript :: javascript check if required 
Javascript :: Getting Elements by Class Name 
Javascript :: javascript get boolean if checkbox is checked 
Javascript :: error while connecting mongodb MongoParseError: option usefindandmodify is not supported 
Javascript :: javascript date methods 
Javascript :: how to delete an object from array in reactjs 
Javascript :: navigation.openDrawer is not a function react native 
Javascript :: nextjs change port 
Javascript :: regex for check if string is only empty or whitespace javascript 
Javascript :: placeholder js 
Javascript :: regex one or more words 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =