Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

[Bug]: Example command to test domain proxy does not work #702

Open
kennedyjosh opened this issue Apr 13, 2023 · 0 comments
Open

[Bug]: Example command to test domain proxy does not work #702

kennedyjosh opened this issue Apr 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kennedyjosh
Copy link

What happened?

Wanting to test my domain proxy, I copied this code from this webpage (replacing it with my own URL) and it doesn't work. I get back a 400 "Invalid JSON" error.

curl --data 'api_key=API_Key' --data-urlencode 'event=[{"user_id":"12345", "event_type":"test_proxy_event", "time":1396381378123}]' http://localhost:8080/amplitude/

The command on this page does work.

curl --location --request POST 'https://api.amplitude.com/2/httpapi' \
--header 'Content-Type: application/json' \
--data-raw '{
    "api_key": "YOUR_API_KEY",
    "events": [
        {
            "user_id": "12345",
            "event_type": "watch_tutorial",
            "user_properties": {
                "Cohort": "Test A"
            },
            "country": "United States",
            "ip": "127.0.0.1",
            "time": 1396381378123
        }
    ]
}'

What browsers are you seeing the problem on?

Safari

Relevant log output

No response

@kennedyjosh kennedyjosh added the bug Something isn't working label Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants