Closed Bug 1099085 Opened 10 years ago Closed 10 years ago

HawkClient and co should support PATCH rest requests

Categories

(Firefox :: Firefox Accounts, defect)

33 Branch
defect
Not set
normal

Tracking

()

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

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(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 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)
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+
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
Closed: 10 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.

Attachment

General

Created:
Updated:
Size: