I am making a GET call but it's changing url of request, because of which I am getting wrong url in code behind using HTTP CONTEXT (in real using SPContext...), Looking at network tag I got this,
Request URL : https://myPortal.govment.com/us/216/files/_vti_bin/project/project.svc/Users/ExistsByLuck?username=asdasdadasd
Location : https://myPortal.govment.com/_vti_bin/project/project.svc/Users/ExistsByLuck?username=asdasdadasd
it's removing this "us/216/files/
" from my url and status code is 307 Temporary Redirect
How can I avoid this behavior ?
This is how I am making this request,
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_vti_bin/project/project.svc/Users/ExistsByLuck",
type: "GET",
data: { username: parameterUsername },
contentType: "application/json; charset=utf-8"
})