Explain a curl command, fetch call, axios call, or raw HTTP request piece by piece, covering method, endpoint, headers, body, and likely response status codes.
You are an instructor teaching how the web actually talks to itself, one client sending a structured request and a server sending back a structured response, and your students usually arrive able to copy a working `fetch` or `curl` example from documentation without being able to say what any individual piece of it is actually doing. Work in [MODE:select:explain the request itself,explain what different possible responses would mean] mode. My request, written as [FORMAT:select:a curl command,a JavaScript fetch call,an axios call,a raw HTTP request], is: [CODE] If I left [CODE] blank, ask me to paste it before doing anything else instead of inventing an example request. If I chose explain the request itself, identify and name each piece present, the HTTP method, such as `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`, and what that method conventionally signals about intent, the endpoint URL and what each segment of its path likely represents, any query parameters and what they are probably filtering or selecting, any headers present and what each one does, such as `Content-Type` telling the server how to parse the body, `Authorization` proving identity, or `Accept` stating what response format the client wants back, and the request body if one exists, explaining its structure and what each field likely represents. If my request is missing something a request of this type would normally need, such as a `POST` with no body or no `Content-Type` header, note that gap rather than silently explaining around it. If I chose explain what different possible responses would mean, do not just define status codes in the abstract. Using my specific request, describe two or three realistic responses this exact call could plausibly receive, and for each one, state the status code, what that code's number range generally signals, `2xx` meaning success, `3xx` meaning redirection, `4xx` meaning the client's request had a problem, `5xx` meaning the server failed to handle an otherwise valid request, and what that specific outcome would mean given what my request is actually trying to do. Include at least one success case and at least one realistic failure case relevant to this request, such as a `401` if the request includes authentication, a `404` if it targets a specific resource by ID, or a `422` if it submits a body that could fail validation, rather than a generic list of every status code that exists. Close by asking whether I have an actual response I received back from running this request, and if so, offer to explain that specific response instead of only the hypothetical ones, since a real response often reveals something the hypothetical cases did not anticipate.
Use this prompt anywhere
10,000+ expert prompts for ChatGPT, Claude, Gemini, and wherever you use AI.
Get Early AccessCopying a working fetch call or curl command from documentation is easy. Knowing what each header, parameter, and status code actually means is a different skill, and most students build API code for months by pattern-matching examples before anyone explains what a 401 versus a 404 is telling them.
This tool explains a request two ways. Request mode takes your [CODE], in curl, fetch, axios, or raw HTTP form, and names every piece, the method and what it conventionally signals, the endpoint and its path segments, each header and its job, Content-Type telling the server how to parse the body, Authorization proving identity, and the body's structure if one exists. If something a request like this would normally need is missing, that gap gets flagged instead of explained around.
Response mode is where most explainers stay too abstract. Instead of listing every status code that exists, it uses your specific request to describe two or three realistic responses it could get back, a success case and at least one relevant failure, a 401 if the request carries authentication, a 404 if it targets a resource by ID, tied to what your request is actually trying to do. A real response gets explained directly instead of only the hypothetical cases. Run it in the Dock Editor to build a reference of explained requests, pair with the code explanation generator for the surrounding function, or the computer science fundamentals explainer for what an API means conceptually.
Drop your curl command, fetch call, axios call, or raw HTTP request into [CODE]. Leaving it blank prompts a request for a real example instead of an invented one.
Set [FORMAT] to curl, JavaScript fetch, axios, or raw HTTP so the explanation reads the syntax correctly for what you actually pasted.
Set [MODE] to explain the request itself for a breakdown of method, endpoint, headers, and body, or explain possible responses to see what realistic status codes for this call would mean.
If your request is missing something requests like it normally need, a POST with no body or no Content-Type header, that gap gets flagged directly instead of glossed over.
If you already ran the request and got a response back, share it and get that specific response explained instead of only the hypothetical cases.
Paste a fetch call from a class assignment and get the method, headers, and body explained piece by piece instead of memorizing the syntax pattern without understanding what each part does.
Use response mode on your actual request to see realistic status codes tied to what that specific call is trying to do, instead of a generic list of every code that exists.
Paste your request and the actual error response you received, and get an explanation of what that specific status code and response mean for your specific call.
Work through sample curl and fetch examples ahead of an upcoming unit on APIs, understanding headers and authentication before the course introduces them.
Discover more prompts that could help with your workflow.
Build a small working program that calls a real public API, with the request, response, and API key setup explained step by step.
Explain a core functional programming idea, such as pure functions or immutability, with a broken code example and its fixed version shown side by side.
Explain a built-in math function, square root, power, absolute value, or rounding, covering math and syntax, then generate practice calls to predict before revealing results.
10,000+ expert-curated prompts for ChatGPT, Claude, Gemini, and wherever you use AI. Our extension helps any prompt deliver better results.