# async\_req

the `async_req` key can be used in order to run commands in an non-synchronic manner. By default when a command is submitted, the system awaits the client response. The `async_req` key allows to change this behavior and run multiple processes simultaneously.

### Input

* <mark style="color:purple;">(Boolean)</mark> - **True** if not to wait for server response, **False** otherwise.

**Example -**

{% tabs %}
{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
new_document= {"id": "131",
               "name": "dave",
                "age": 43}

hyperspace_client.update_document(body=new_document, 
                                  collection_name='partial_update', 
                                  async_req=True);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
Document doc = new Document();
doc.setId("131");
doc.putAdditionalProperty("name", "dave");
doc.putAdditionalProperty("age", 43);

boolean partialUpdate = true;
boolean docAsUpsert = true;                        
hyperspaceClient.updateDocument(new_document, collection_name, partialUpdate, docAsUpsert, async_req=True);
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```javascript
const new_document= {"id": "131",
                        "name": "dave",
                         "age": 43}
const partialUpdate = true;
const docAsUpsert = true;

await hyperspaceClient.updateDocument(collectionName, new_document, async_req=True);
```

{% endcode %}
{% endtab %}
{% endtabs %}

In the above example, the document with the id corresponding to `new_doc["id"]` will be updated in a non synchronic manner.


---

# 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://docs.hyper-space.io/hyperspace-docs/api-documentation/hyperspace-client/async_req.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.
