I'm trying to mimic this curl command to an ajax call.
curl -H 'X-Auth-Id' 'someid' http://someurl.com/api/posts
I've tried using
$.ajax({
    url: 'http://someurl.com/api/posts',
    type: 'get',
    headers: {
        'X-User-Id': userId
    },
    success: function(data) {
        console.log(data);
    }
});
But I seem to be getting an Invalid status code error, which I do not get when using curl from bash.
 
    