Skip to content

Add JavaScript fetch output #4

@philipnorton42

Description

@philipnorton42

Add an output format to convert the curl comments into JavaScript fetch requests.

Something like this:

fetch('https://example.com/', {
  method: 'POST',
  headers: {
    'Content-Type': 'Content-Type: application/json',
  },
  body: JSON.stringify('{"key":"value"}',),
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions