# Thunder

VSCode-pluginet [Thunder Client](https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client) låter oss göra REST-anrop till servrar utan att programmera en klient.

<figure><img src="/files/04xBAdWugeY8xe5bSUiH" alt=""><figcaption></figcaption></figure>

Den är ganska enkel att använda.

* Gå till Thunder client i VSCode.
* Välj din metod, t.ex. GET eller POST
* Skriv in din URL
* Klicka SEND
* Resultatet ser du under Response.

## Skicka JSON-data

Om man ska skicka in data till ett API den här vägen, behöver den skrivas in i requestens Body-del.

Antagligen behöver datan också formateras som JSON. Om man till exempel vill POST:a in en ny Pokemon in i exempel-API-servern vars modeller beskrivs under Models/dataklasser så skriver man såhär i Body:

```javascript
{
    "name": "Nyarlathotep"
}
```

Ofta kan man undersöka den output man får från GET för att se hur JSON-datan behöver vara formaterad.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://csharp.progdocs.se/annat/naetverk-och-internet/thunder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
