Closed Bug 1099085 Opened 5 years ago Closed 5 years ago

HawkClient and co should support PATCH rest requests


(Firefox :: Firefox Accounts, defect)

33 Branch
Not set



Firefox 36
Tracking Status
firefox35 --- fixed
firefox36 --- fixed


(Reporter: standard8, Assigned: standard8)




(1 file)

Currently, hawkclient, hawkrequest and restrequest don't support Rest Requests for the PATCH method.

We need this for Loop as one of the APIs uses PATCH.
This does the necessary work to add support for PATCH requests.

I've re-enabled the test_hawkclient.js test, as MOZ_SERVICES_FXACCOUNTS is no longer part of the build system, hence what was done in no longer works, and the test is never run.

Try push should be here:

Chris, would you be able to review this today or really soon? We're trying to get some of Loop uplifted to aurora asap, and we need this as part of it. Thanks.
Attachment #8522946 - Flags: review?(ckarlof)
Hi Mark,

I'm sorry I didn't get to this Friday. I gave it the once over and so far it looks fine. I'll finish it Monday, but in the meantime, :rfk could you also sanity check this?
Flags: needinfo?(rfkelly)
Thanks, we've actually made it so that this doesn't block what we were hoping to push out to nightly users, though it still obviously blocks part of the feature (renaming rooms), so we'd still like to land it early this week if possible.
This seems sensible to me.  I don't grok the JS testing stuff enough to check the details of refactoring there but it all seems fine at a high level.
Flags: needinfo?(rfkelly)
Comment on attachment 8522946 [details] [diff] [review]
HawkClient, HawkRequest and RESTRequest should support PATCH requests

Review of attachment 8522946 [details] [diff] [review]:

Pretty straightforward.

::: services/common/tests/unit/test_restrequest.js
@@ +272,5 @@
>  /**
> + * Used for testing PATCH/PUT/POST methods.
> + */
> +function check_posting_data(method) {

Attachment #8522946 - Flags: review?(ckarlof) → review+
Assignee: nobody → standard8
Target Milestone: --- → mozilla36
Closed: 5 years ago
Resolution: --- → FIXED
Comment on attachment 8522946 [details] [diff] [review]
HawkClient, HawkRequest and RESTRequest should support PATCH requests

Approval Request Comment

requirement for Loop Rooms support for Aurora/35
On m-c; testing with rooms server changes now live in production

[String/UUID change made/needed]: none
Attachment #8522946 - Flags: approval-mozilla-aurora?
Attachment #8522946 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Core → Firefox
Target Milestone: mozilla36 → Firefox 36
You need to log in before you can comment on or make changes to this bug.