
When do I use path parameters vs. query parameters in a RESTful …
However, I assume that you are not creating a true REST API, but a 'REST inspired' API (such as the Google Drive one). In these cases the rule of thumb is 'path parameters = resource …
How can I process a pdf using OpenAI's APIs (GPTs)?
Nov 12, 2023 · Is there an API from openAI that can receive pdfs? I know there are 3rd party libraries that can read pdf but given there are images and other important information in a pdf, …
403 Forbidden vs 401 Unauthorized HTTP responses
Jul 21, 2010 · With a well-designed, secure API, public enumeration of your api endpoints is not a problem. If a request matches a pattern like GET /users/:id , then the response for an …
400 BAD request HTTP error code meaning? - Stack Overflow
Oct 30, 2013 · In the case of a REST API with a JSON payload, 400's are typically, and correctly I would say, used to indicate that the JSON is invalid in some way according to the API …
REST API filter operator best practice - Stack Overflow
Now, my API should allow many different filter operators. Numeric operators such as equals , greater than , less than , string operators like contains , begins with or ends with and date …
What is the difference between PUT, POST, and PATCH?
Jun 27, 2015 · Using PUT or PATCH can make your API semantically more readable and easier to use, but also can add to the complexity of having multiple HTTP methods, possibly …
Http 415 Unsupported Media type error with JSON
I was sending "delete" rest request and it failed with 415. I saw what content-type my server uses to hit the api. In my case, It was "application/json" instead of "application/json; charset=utf8". …
c# - How do I pass an object to HttpClient.PostAsync and serialize …
Next, you want to set the content type to let the API know this is JSON. byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); Then …
API, passing bearer token to GET HTTP URL - Stack Overflow
Dec 16, 2019 · You are using the OAuth 2.0 but there several more API Key / Bearer Token / .. Before sending the request Make sure to send a body if the request is waiting for a …
How to return HTTP 500 from ASP.NET Core RC2 Web Api?
Jun 13, 2016 · For API Responses (using net core), I have tried this and seems that it is working fine: var err = Content ...