# Is it possible for http\_request method to NOT be only query, but also update method?

**URL:** <https://forum.dfinity.org/t/is-it-possible-for-http-request-method-to-not-be-only-query-but-also-update-method/15184>\
**Category:** Getting Started\
**Created:** [August 30, 2022, 10:45am UTC](https://forum.dfinity.org/t/is-it-possible-for-http-request-method-to-not-be-only-query-but-also-update-method/15184 "2022-08-30T10:45:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnonymousCoder](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/anonymouscoder/32/4747_2.png) [@AnonymousCoder](https://forum.dfinity.org/u/AnonymousCoder)\
**Post date:** [August 30, 2022, 10:45am UTC](https://forum.dfinity.org/t/is-it-possible-for-http-request-method-to-not-be-only-query-but-also-update-method/15184/1 "2022-08-30T10:45:00Z")

</div>

Hey there

I am testing locally making a canister http\_request method make an inter-canister call to check upon data in another canister and then return proper HttpResponse (but not before checking that other canister to confirm that data to be returned CAN actually be returned).

When trying to deploy, this however, gives me `misplaced await` error and does not want to deploy, for any combination of either:

- Making http\_request in asset canister a `query` method and then doing inter-canister call to a public shared method of the canister where I want to return data from, or
- Making http\_request in asset canister NOT a `query` method and then doing inter-canister call to a query method in of the canister where I want to return data from

Making me believe that `http_request` method HAS to always be a query method (or am I wrong and it doesn’t have to be a query method)?

---

<div class="post-metadata">

**Author:** ![domwoe](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/domwoe/32/5165_2.png) [@domwoe](https://forum.dfinity.org/u/domwoe)\
**Post date:** [August 30, 2022, 11:44am UTC](https://forum.dfinity.org/t/is-it-possible-for-http-request-method-to-not-be-only-query-but-also-update-method/15184/2 "2022-08-30T11:44:13Z")

</div>

Yes, `http_request` has to be query method, but you can upgrade it to let the HTTP Gateway call `http_request_update`.

- [Interface Specification for upgrading a `http_request`](https://internetcomputer.org/docs/current/references/ic-interface-spec#upgrade-to-update-calls)
- [Example Application](https://github.com/dfinity/examples/blob/8b01d548d8548a9d4558a7a1dbb49234d02d7d03/motoko/http_counter/src/main.mo)

---

<div class="post-metadata">

**Author:** ![icpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/icpp/32/9310_2.png) [@icpp](https://forum.dfinity.org/u/icpp)\
**Post date:** [December 11, 2023, 8:43pm UTC](https://forum.dfinity.org/t/is-it-possible-for-http-request-method-to-not-be-only-query-but-also-update-method/15184/3 "2023-12-11T20:43:48Z")

</div>

@domwoe ,

What is the curl command to call the http\_request method when I deploy [the example](https://github.com/dfinity/examples/tree/8b01d548d8548a9d4558a7a1dbb49234d02d7d03/motoko/http_counter) to mainnet?

I am not sure what URL to use…

---

<div class="post-metadata">

**Author:** ![icpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/icpp/32/9310_2.png) [@icpp](https://forum.dfinity.org/u/icpp)\
**Post date:** [December 11, 2023, 8:48pm UTC](https://forum.dfinity.org/t/is-it-possible-for-http-request-method-to-not-be-only-query-but-also-update-method/15184/4 "2023-12-11T20:48:37Z")

</div>

Actually, scratch that 😉

I figured it out, that simply:

```auto
curl https://<canister-id>.raw.icp0.io

```

does the job.
