Setting Rest Call methods work with data
The endpoints in the SharePoint REST service correspond to the types and members in the SharePoint client object models. By using HTTP requests, you can use these REST endpoints to perform typical CRUD operations against SharePoint entities, such as lists and sites.

Read more about Representational State Transfer (REST) service for SharePoint at: Get to know the SharePoint REST service
Your issue
Let me see if I can point you in the right direction as well as provide a snippet you may manipulate to get you toward solving this issue you are having.
I cannot comment as I do not have enough points (Yet). However, I do have a question to you. Are trying to PUT something on site or GET something from the site? Also what is the _spPageContextInfo request using relative Server URL versus Absolute URL does make a huge difference.
<script>
/*
I defined mine as _spPageContextInfo call
my thought is if you define the SharePoint Context info to get the URL using either Server or Site Relative URL versus Absolute URL
var siteRelativeURL = _spPageContextInfo.webServerRelativeUrl; // Or ("siteServerRelativeUrl")
// versus
var siteAbsoluteURL = _spPageContextInfo.webAbsoluteUrl; // Or
("siteAbsoluteUrl")
//combine and return for Ajax call
var url = siteRelativeURL + callURL;
console.log(url) // http://sp.com/my/site/collection/sub/site/
//However, they will both return http://sp.com/my/site/collection/sub/site/
//The server reads as listed above yet really they are returned as listed
below:
//Relative will return as = /
//Absolute will return as = http://sp
*/
$(document).ready(function()
{
//PLEASE KEEP IN MIND THAT MINE IS FOR A PICTURE LIBRARY CAROUSEL
//BTW Feel free to Use this. I do not mind sharing any questions email me at jonathan.r.adcox@gmail.com
jQuery.support.cors = true;
var siteURL = _spPageContextInfo.webServerRelativeUrl; //changing to this can help
var url = siteURL + "/_api/web/lists/GetByTitle('carousel')/Items?$select=ID,Title,Category,photoAuthor,writeUp,File/ServerRelativeUrl,FileRef/FileRef&$expand=File/ServerRelativeUrl"; // returning a filter query may help to extend the property
$.ajax
({
url: url,
method: "GET",//We are getting data not updating posting or removing data
contentType: "application/json; odata=verbose",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data)
{
$("#ResultDiv").empty();
for(var i = 0; i < data.d.results.length; i++)
{
var item = data.d.results[i]; //define the data results
var ID = item.ID;
var Title = item.Title;
var Category = item.Category;
var Author = item.photoAuthor;
var Para = item.writeUp;
var Picture = item.FileRef;// this one set me on a trail for 5 days
var listURL = "../carousel/Forms";
var DispForm = listURL + "/DispForm.aspx?ID=";
var titleURL = "<a href='"+DispForm+ID+"' target='_blank'>"+Title+"</a>";
var UpForm = listURL + "/Upload.aspx";
if (Category == "Featured")
{
$( "#netcomSlider" ).append( "<li><a href='"+DispForm+ID+"' target='_blank'><div class='slide' style=\"background-image: url('" + Picture + "');\"></div></a>" +
"<div class='slide-text'>" +
"<p><span class='header-text'>" + titleURL + "</span><br />" +
"<br />Photo by: " + Author + "<br />" +
"<br />" + Para + "<br /><br /><span><a href='"+UpForm+"' target='_blank'> + New Article</a></span></p>" +
"</div></li>" );
}
}
$('.netcomBanner').unslider({
animation: 'fade',
autoplay: true,
arrows: false,
speed: 1000, // The speed to animate each slide (in milliseconds) [default: 750]
delay: 6000 // The delay between slide animations (in milliseconds) [default: 3000]
});
},
error: function(data)
{
$("#ResultDiv").empty().text(data.responseJSON.error);
}
});
});
</script>
Hope this may help or at least help to reexamine your code for possible resolution.