Skip to content

Conversation

@MostafaFawzy7
Copy link
Contributor

No description provided.

README.md Outdated
};

ApiKitClient.post<User>('/users', newUser)
ApiKitClient.post<User>('/users', newUser, 'json')
Copy link
Member

Choose a reason for hiding this comment

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

I prefer the third argument to be an object, because later it will give us flexibility to add extra options.

Copy link
Member

Choose a reason for hiding this comment

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

Also do we need to have the full known Content-Type like: application/json, application/xml ... ? or default axios config request accept your format ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

default axios config

Copy link
Member

Choose a reason for hiding this comment

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

I am what is the default response type json or application/json ?

Copy link
Contributor Author

@MostafaFawzy7 MostafaFawzy7 May 7, 2024

Choose a reason for hiding this comment

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

Content-Type: application/json
Response-Type: json or what the user to decide!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@amrography Done! ✅

@Abdallah-Abdelkhalek
Copy link

Looks good, did you test it locally ?
1- Case that options is not passed
2- Case only 1 of the 2 options is passed or both

@MostafaFawzy7
Copy link
Contributor Author

Looks good, did you test it locally ? 1- Case that options is not passed 2- Case only 1 of the 2 options is passed or both

It doesn't matter as the entire options object is optional, and each property inside is optional as well...

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.

4 participants