HawkClient and co should support PATCH rest requests

RESOLVED FIXED in Firefox 35

Status

()

Firefox
Firefox Accounts
RESOLVED FIXED
3 years ago
a day ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

33 Branch
Firefox 36
Points:
---

Firefox Tracking Flags

(firefox35 fixed, firefox36 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8522946 [details] [diff] [review]
HawkClient, HawkRequest and RESTRequest should support PATCH requests

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 http://hg.mozilla.org/mozilla-central/rev/0eb6ed1dc691 no longer works, and the test is never run.

Try push should be here: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=3806f5e95dc6

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)
(Assignee)

Comment 3

3 years ago
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) {

Thanks!
Attachment #8522946 - Flags: review?(ckarlof) → review+
(Assignee)

Comment 6

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/a0149f5555a5
Assignee: nobody → standard8
Target Milestone: --- → mozilla36
https://hg.mozilla.org/mozilla-central/rev/a0149f5555a5
Status: NEW → RESOLVED
Last Resolved: 3 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+
https://hg.mozilla.org/releases/mozilla-aurora/rev/107c64f93feb

Updated

3 years ago
status-firefox35: --- → fixed
status-firefox36: --- → fixed

Updated

a day ago
Product: Core → Firefox
Target Milestone: mozilla36 → Firefox 36
You need to log in before you can comment on or make changes to this bug.