Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use GET vs POST for seeding. #179

Merged
merged 3 commits into from
Jul 9, 2023
Merged

Conversation

kepol
Copy link
Contributor

@kepol kepol commented Jul 5, 2023

@kepol
Copy link
Contributor Author

kepol commented Jul 5, 2023

So far this only has the form field and helper function. This needs work to add the logic for using GET/POST based on this.

@steveworley
Copy link
Contributor

Added a commit that handles updating the internal request method; after doing a bit of digging on drupal_http_request it defaults to GET https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_http_request/7.x — so this change might not be super relevant after the fact.

Without the change:

drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:42:35 +0000] "GET /node/48 HTTP/1.0" 200 11236 "-" "Quant (+http://quantcdn.io)" "-"
drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:42:35 +0000] "GET /node/49 HTTP/1.0" 200 10827 "-" "Quant (+http://quantcdn.io)" "-"

With the change (enable GET)

drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:42:35 +0000] "GET /node/48 HTTP/1.0" 200 11236 "-" "Quant (+http://quantcdn.io)" "-"
drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:42:35 +0000] "GET /node/49 HTTP/1.0" 200 10827 "-" "Quant (+http://quantcdn.io)" "-"

and with the change enable POST

drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:44:31 +0000] "POST /node/25 HTTP/1.0" 200 11589 "-" "Quant (+http://quantcdn.io)" "-"
drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:44:31 +0000] "POST /node/26 HTTP/1.0" 200 12081 "-" "Quant (+http://quantcdn.io)" "-"
drupal7-docker-stack-nginx-1  | 172.23.0.3 - - [07/Jul/2023:00:44:31 +0000] "POST /node/27 HTTP/1.0" 200 11826 "-" "Quant (+http://quantcdn.io)" "-"

This aligns D7 with D8+ so it's a good change though.

@kepol
Copy link
Contributor Author

kepol commented Jul 9, 2023

Ah, gotcha. I removed the helper function. I'll merge this.

Do we need to update the curl POST logic in quant_api_quant_seed_file?

@kepol kepol merged commit abdd299 into 7.x-1.x Jul 9, 2023
@kepol kepol removed the needs review label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drupal 7 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants