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

Updating docs to include content-type header #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SpencerKaiser
Copy link
Contributor

Description of Changes

Adding the content type header to the example snippets

Related Issues

Comment on lines +30 to +35
{
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this not set by default when you send a json body?

image

image

I looked at the discord thread and I guess it depends on the HTTP client you are using, hence my preference for axios here. Perhaps a comment / section under headers in the REST api section - thoughts?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea it totally depends on the client and it won't hurt by adding it on but it will totally fail if the client doesn't include it.

We can add a section for headers, but it seems slightly overkill vs just a line in the example. Im good with either though.

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.

None yet

2 participants