> For the complete documentation index, see [llms.txt](https://docs.inrupt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inrupt.com/sdk/java-sdk/crud-data/appendix-low-level-http-requests.md).

# Low-level HTTP Requests

In addition to the high-level APIs **`.create()`**, **`.read()`**, **`.update()`**, **`.delete()`**, to perform low-level HTTP requests, the Java Client Libraries include:

* [Request.Builder](https://api.docs.inrupt.com/docs/developer-tools/api/java/inrupt-client/latest/com/inrupt/client/Request.Builder.html) to build HTTP requests.
* [Request.BodyPublishers](https://api.docs.inrupt.com/docs/developer-tools/api/java/inrupt-client/latest/com/inrupt/client/Request.BodyPublishers.html) to handle request body payloads.
* **`.send()`** method in [SolidSyncClient](https://api.docs.inrupt.com/docs/developer-tools/api/java/inrupt-client/latest/com/inrupt/client/solid/SolidSyncClient.html) and [SolidClient](https://api.docs.inrupt.com/docs/developer-tools/api/java/inrupt-client/latest/com/inrupt/client/solid/SolidClient.html) to send the request.
* [Response.BodyHandlers](https://api.docs.inrupt.com/docs/developer-tools/api/java/inrupt-client/latest/com/inrupt/client/Response.BodyHandlers.html) to handle response body payloads.

For example, the following uses the Java Client Library to create a **`PUT`** request to save a file to a Pod and send the request:

```java
import com.inrupt.client.Request;
import com.inrupt.client.Response;
import java.io.InputStream;
import java.io.IOException;
//...

// MultipartFile file = ...

try (final var fileStream = file.getInputStream()) {
    Request request = Request.newBuilder()
       .uri(URI.create("https://storage.example.com/some/resource"))
       .header("Content-Type", file.getContentType())
       .PUT(Request.BodyPublishers.ofInputStream(fileStream))
       .build();
    Response<Void> response = client.send(
       request,
       Response.BodyHandlers.discarding());

} catch (IOException e1) {
    e1.printStackTrace();
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.inrupt.com/sdk/java-sdk/crud-data/appendix-low-level-http-requests.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
