Skip to content

Feature/http request converter - #438

Merged
shamilahmdt merged 3 commits into
shamilahmdt:mainfrom
farzan2004:feature/http-request-converter
Aug 3, 2026
Merged

Feature/http request converter#438
shamilahmdt merged 3 commits into
shamilahmdt:mainfrom
farzan2004:feature/http-request-converter

Conversation

@farzan2004

Copy link
Copy Markdown
Contributor

HTTP Request Converter

Overview

This PR adds a new HTTP Request Converter utility to DevTasks. It allows developers to convert HTTP request snippets between cURL, Fetch API, and Axios directly in the browser. All conversions are performed offline with no external requests.

Features

  • Convert between cURL, Fetch API, and Axios
  • Supports bidirectional conversion between all three formats
  • Offline conversion (no data leaves the browser)
  • Live request parsing and validation
  • Copy source/output snippets
  • Swap source and target formats
  • Sample request generator
  • Dark mode compatible
  • Responsive UI

Supported Syntax

cURL

  • -X, --request
  • -H, --header
  • -d, --data
  • Single-line and multiline commands

Fetch API

  • fetch(url)
  • fetch(url, options)
  • method
  • headers
  • body
  • JSON.stringify(...)

Axios

  • axios({...})
  • axios.get()
  • axios.post()
  • axios.put()
  • axios.patch()
  • axios.delete()

Request Components Supported

  • HTTP Method
  • URL
  • Headers
  • Request Body
  • JSON payloads
  • Plain text payloads

Parsing Architecture

The converter uses a common intermediate request representation.

Source Format

Parser

Canonical Request Object

Generator

Target Format

This separation keeps parsing and code generation independent, making the implementation easier to maintain and extend.

Error Handling

The converter validates input while parsing and reports descriptive errors for unsupported or malformed request snippets instead of generating invalid output.

  • Missing URL
  • Invalid headers
  • Malformed request body
  • Unsupported syntax

UI

  • Source and output editors
  • Format selectors
  • Convert action
  • Swap source/target formats
  • Copy buttons
  • Sample request generator
  • Error display panel

Notes

The utility is designed for common developer workflows and currently supports the most frequently used cURL, Fetch API, and Axios request patterns.

Screenshots

Utility Card

Screenshot (723)

HTTP Request Converter – Desktop

Screenshot (724)

HTTP Request Converter – Tablets

Screenshot (726)

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

@farzan2004 is attempting to deploy a commit to the shamilahmdt's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

👋 Hello, @farzan2004!

Thank you for your contribution to DevTasks.

The maintainer has been notified and will review your pull request shortly. If any changes are needed, we will let you know in the comments below.

…t-converter

# Conflicts:
#	src/pages/DevUtilities/DevUtilities.jsx
@shamilahmdt
shamilahmdt merged commit d0b1fad into shamilahmdt:main Aug 3, 2026
1 check failed
@farzan2004

Copy link
Copy Markdown
Contributor Author

I noticed the post-merge build failed because DevUtilities.jsx still contained unresolved merge conflict markers. I've opened a follow-up PR (#439 ) that removes the markers and restores a successful build.

@shamilahmdt

Copy link
Copy Markdown
Owner

@farzan2004 ,Thank you for your work! If you have time, I'd really appreciate it if you could also check out the issues in my other project: https://github.com/shamilahmdt/quickplay-zone/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants