Skip to content

Conversation

@crgee1
Copy link
Contributor

@crgee1 crgee1 commented Dec 2, 2020

  • Using POST method for browse tracking functions
  • Send key/value fields (filterValue, filterName, etc...) through request body instead of params

@crgee1 crgee1 added the wip Work in progress label Dec 2, 2020
@crgee1 crgee1 requested a review from rubikzube December 2, 2020 22:18
@crgee1 crgee1 changed the title [NOCH] Change Method to POST [CH12120] Change Method to POST Dec 3, 2020
val path = "/v2/behavioral_action/browse_result_click?filter_name=group_id&filter_value=Movies&customer_id=TIT-REP-1997&result_position_on_page=4&autocomplete_section=Products&key=copper-key&i=wacko-the-guid&ui=player-three&s=67&c=cioand-2.3.0&_dt=";
assert(request.path.startsWith(path))
val request = mockServer.takeRequest(10, TimeUnit.SECONDS)
assertEquals(null, request)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throttleBody throttles the request reader and response writer, so it might make sense for the mockServer.takeRequest(10, TimeUnit.SECONDS) to return null

val path = "/v2/behavioral_action/browse_result_load?filter_name=group_id&filter_value=Movies&num_results=10&action=browse-results&key=copper-key&i=wacko-the-guid&ui=player-three&s=67&c=cioand-2.3.0&_dt=";
assert(request.path.startsWith(path))
val request = mockServer.takeRequest(10, TimeUnit.SECONDS)
assertEquals(null, request)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throttleBody throttles the request reader and response writer, so it might make sense for the mockServer.takeRequest(10, TimeUnit.SECONDS) to return null

@crgee1 crgee1 removed the wip Work in progress label Dec 3, 2020
@Query("customer_id") customerId: String,
@Query("result_position_on_page") resultPositionOnPage: Int,
@POST(ApiPaths.URL_BROWSE_RESULT_CLICK_EVENT)
fun trackBrowseResultClick(@Body browseRequestBody: BrowseRequestBody,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@crgee1 crgee1 requested a review from rubikzube December 10, 2020 21:48
Copy link
Contributor

@rubikzube rubikzube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For browse result click and load we also need to pass query params set in the URL in the request body (a.k.a most of the params set in the RequestInterceptor)

@crgee1 crgee1 requested a review from rubikzube December 15, 2020 17:43
@rubikzube rubikzube merged commit 10b7298 into master Dec 23, 2020
@rubikzube rubikzube deleted the noch/browse-post branch December 23, 2020 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants