http-request-in-editor

Reference implementation of HTTP Request in Editor Specification https://github.com/JetBrains/http-request-in-editor-spec

APACHE-2.0 License

Stars
34
http-request-in-editor - v0.4.0 Latest Release

Published by char0n over 2 years ago

  • change license to Apache 2.0
  • fix parsing of request-target
  • fix various parsing ambiguities
  • add initial runtime support
http-request-in-editor - v0.3.0

Published by char0n almost 4 years ago

  • implemented the whole HTTP REQUEST IN EDITOR specification (except env variables)
  • eliminate all grammar ambiguities
http-request-in-editor - v0.2.0

Published by char0n almost 4 years ago

  • Implemented proper CST representation returned by the parser
http-request-in-editor - v0.1.0

Published by char0n over 4 years ago

First release containing full implementation of the HTTP Request in Editor Spec.

const { parse } = require('http-request-in-editor');


const http = `
POST https://httpbin.org/post

###
`;

const ast = parse(http);

/**
 *
 * [
 *  [
 *    {
 *        method: 'POST',
 *        requestTarget: [Object],
 *        httpVersion: '1.1',
 *        headers: [],
 *        body: [Array],
 *        responseHandler: null,
 *        responseRef: null
 *      }
 *    ] 
 *  ]
 */