Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Rest API Using Authorization Key
Gautam Parmar
Oct 9 2017 1:41 AM
149
Reply
This is first time i have started working on Rest API's
I have tried a lot to find resources but couldnt achieve
as per documentation This has to be my request header and request will be POST
" Authorization":"125THIS123IS123TEST1354",
"cache-control":"no-cache",
"content-type":"application/json"
I have tried alot to send data but got 401 Unauthorized error.
$.ajax({
type:
"POST"
,
url:
'https://testurl/api/test'
,
headers: {
'Authorization'
:
'125THIS123IS123TEST1354'
,
'content-type'
:
'application/json'
,
'cache-control'
:
'no-cache'
},
success:
function
(data) {
alert(
'success'
)
},
failure:
function
(msg) {
alert(msg);
}
});
I dont know am going on right way or is ther eany other method.....
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Getting datalist control to append more data to list when
asp.net forms are not opening in the google chrome