HTTP request from javascript using raw message including headers

前端 未结 4 663
说谎
说谎 2021-01-21 15:25

I know how to make an HTTP request to my REST api from javascript using jQuery or XMLHttpRequest. What I want to do now is make the request without setting properties for the he

4条回答
  •  鱼传尺愫
    2021-01-21 16:01

    There is no socket support in Javascript. You can only build HTTP queries by using the XMLHTTPRequest wrapper, or optionally wrappers for that such as jQuery.ajax. This is for all kinds of good reasons, principally security.

提交回复
热议问题