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

Empty body is sent when making request #67

Closed
MatthieuuC opened this issue May 11, 2023 · 8 comments
Closed

Empty body is sent when making request #67

MatthieuuC opened this issue May 11, 2023 · 8 comments

Comments

@MatthieuuC
Copy link
Contributor

Hello 👋

I noticed that the provider makes GET/POST calls with an empty body {}.

This is a problem for example if our phpipam is behind a load balancer that refuses GET requests with a body (Google Load balancer for example ...).

Terraform DEBUG Output

phpipam_subnet.subnet_prod: Refreshing state... [id=7]
2023-05-11T17:34:55.806+0200 [INFO]  provider.terraform-provider-phpipam_v1.3.8: 2023/05/11 17:34:55 Request Body Debug ................... {}: timestamp=2023-05-11T17:34:55.806+0200
2023-05-11T17:34:55.806+0200 [INFO]  provider.terraform-provider-phpipam_v1.3.8: 2023/05/11 17:34:55 Request URL Debug ...................Method: GET, UR: https://127.0.0.1/api/terraform/subnets/7/: timestamp=2023-05-11T17:34:55.806+0200
2023-05-11T17:34:55.806+0200 [INFO]  provider.terraform-provider-phpipam_v1.3.8: 2023/05/11 17:34:55 Request Body Debug ................... {}: timestamp=2023-05-11T17:34:55.806+0200

We can see the empty body after ...................

So in my case I can you the provider because my PHPIPam server is behind GCP GLB.

Thanks

@lord-kyron
Copy link
Owner

@pavel-z1 I've never thought about this usecase. Is there something we can do about it?

@MatthieuuC
Copy link
Contributor Author

MatthieuuC commented May 11, 2023

@pavel-z1 Just for the example (I'm not a dev), MatthieuuC/phpipam-sdk-go@2742655

Maybe this will fix ?

@pavel-z1
Copy link
Collaborator

Hi @MatthieuuC
It makes sense
Can you please make a pull request to the SDK?

@lord-kyron
Copy link
Owner

@pavel-z1 After the pull request to the sdk is merged, can you add this feature to your current pull request so that I can merge everything at once?

@pavel-z1
Copy link
Collaborator

Yes I will do it

@UpperM
Copy link

UpperM commented May 11, 2023

Thanks guys, I've made a PR pavel-z1/phpipam-sdk-go#14

I've not tested (I don't no how to do), I think It can do the job

(Yes I'm @MatthieuuC, it's my personnal account)

@lord-kyron
Copy link
Owner

lord-kyron commented May 13, 2023

Fixed with #68
New version will be released tomorrow.

@lord-kyron
Copy link
Owner

New version was released today - v1.5.0 including all the changes.

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

No branches or pull requests

4 participants