Skip to content

I created a library to use Pantry from .Net #101

Closed Answered by imRohan
Krutonium asked this question in Q&A
Discussion options

You must be logged in to vote

@Krutonium Awesome work, I'd love to include your library here one day once you're done!

While I'm not too familiar with .NET a few things did stick out when I was looking at the request logic.

I have a hunch that the POST request (used to create a new basket) needs to have a Content-Type header added to it for things to work as intended. Also, the content itself may need to be parsed a certain way?

I'm not 100% sure if that's the fix but I hope that helps?

Here's a snippet (C#) that creates a basket and logs the response

var client = new RestClient("https://getpantry.cloud/apiv1/pantry/YOUR_PANTRY_ID/basket/YOUR_BASKET_NAME");
client.Timeout = -1;
var request = new RestRequest(Method.POS…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by imRohan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #97 on September 17, 2021 13:30.