ahmadnassri/httpsnippet

View on GitHub
src/targets/javascript/jquery/fixtures/full.js

Summary

Maintainability
A
0 mins
Test Coverage
const settings = {
  async: true,
  crossDomain: true,
  url: 'http://mockbin.com/har?foo=bar&foo=baz&baz=abc&key=value',
  method: 'POST',
  headers: {
    cookie: 'foo=bar; bar=baz',
    accept: 'application/json',
    'content-type': 'application/x-www-form-urlencoded'
  },
  data: {
    foo: 'bar'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});