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

Update libraries #100

Merged
merged 12 commits into from
Nov 26, 2024
Merged

Update libraries #100

merged 12 commits into from
Nov 26, 2024

Conversation

ajendrosch
Copy link
Contributor

upgraded libraries (on the feat/enable_http_headers branch. Now the build should work).

@ajendrosch ajendrosch requested a review from a team as a code owner November 7, 2024 21:06
Copy link
Contributor Author

@ajendrosch ajendrosch left a comment

Choose a reason for hiding this comment

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

http headers working similar to curl. The http-header parameter can be set multiple times. Libraries upgraded.

@ajendrosch ajendrosch removed the request for review from a team November 25, 2024 21:23
@ajendrosch ajendrosch enabled auto-merge (squash) November 25, 2024 21:38
@ajendrosch ajendrosch disabled auto-merge November 25, 2024 21:38
@ajendrosch
Copy link
Contributor Author

Call:
go run cmd/collector/main.go
--storage="api"
--environment-name=test
--debug=true
--api-endpoint=http://localhost:8080/
--http-header="X-Api-Key:secret"
--http-header="Authorization:Bearer :1,2.3;4-5'6"
--api-key="56789"
--api-signature="890"

Result:
PUT / HTTP/1.1
Host: localhost:8080
User-Agent: Go-http-client/1.1
Content-Length: 24313
Authorization: Bearer :1,2.3;4-5'6
Content-Type: application/json
X-Api-Key: secret
X-Api-Signature: 890
Accept-Encoding: gzip

@ajendrosch ajendrosch closed this Nov 25, 2024
@ajendrosch ajendrosch reopened this Nov 25, 2024
Copy link
Contributor Author

@ajendrosch ajendrosch left a comment

Choose a reason for hiding this comment

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

added log message for success

Copy link
Contributor Author

@ajendrosch ajendrosch left a comment

Choose a reason for hiding this comment

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

ok

@ajendrosch ajendrosch merged commit 059f684 into main Nov 26, 2024
3 checks passed
@ajendrosch ajendrosch deleted the update-libraries branch November 26, 2024 21:30
ajendrosch added a commit that referenced this pull request Nov 26, 2024
* added HTTP Header support for API requests

* updated used libraries

* Update golang 1.22 -> 1.23 in Dockerfile

* switching to pflag.StringArrayVar() to allow for
multiple values to be passed in for the --http-header flag

* upgraded go and static debian versions

* Remove binary file

* removed logging

* commenting out unused vars

* Delete cmd/collector/collector

deleting collector binary

* added upload succeeded log message in api.go
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.

2 participants