Skip to content

For ViewQuery.keys(), use GET instead of POST #165

@ceefour

Description

@ceefour

Currently Ektorp uses POST to get a ViewQuery that has specified keys() :

06:44:05.451 | DEBUG | ostersg_Worker-4 | c.q.g.c.s.PlaceProgressCalcJob   | Executing calcAndStoreAllPlaceProgress for tenant 'boostersg'
06:44:05.466 | INFO  | ostersg_Worker-4 | c.q.g.c.a.GuardianAnalyticsImpl  | [boostersg] Calculating PlaceProgress for 1 places (incl. unplaced): [sherway_garden]
06:44:05.466 | TRACE | ostersg_Worker-4 | o.e.h.StdHttpClient              | Content: {"keys":["sherway_garden"]}
06:44:05.565 | TRACE | ostersg_Worker-4 | o.e.h.StdHttpClient              | POST /boostersg_prd/_design/Checklist/_view/placeId_active_only 200 OK
06:44:05.565 | DEBUG | ostersg_Worker-4 | sitory/boostersg_prd/checklist/1 | Find all Checklist IDs by Place [sherway_garden] returned 0: []

While it works, services like Cloudant charges POST requests 5 times more expensive than GET requests.

Ektorp should default to GET requests unless it's really necessary to use POST? (maybe when the GET URI is close to 8 KB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions