How to configure JSON deserialization options in .NET minimal API project
I have a .NET minimal API project, as described here. One of the endpoints accepts JSON in the request body, and this is deserialized automatically. The code looks something like...
View ArticleBest practice to return errors in ASP.NET Web API
I have concerns on the way that we returns errors to client.Do we return error immediately by throwing HttpResponseException when we get an error:public void Post(Customer customer){ if...
View ArticleConvertFrom-Json : Cannot convert the JSON string because a dictionary that...
The following JSON is getting returned from OData API service:{"d": {"results": [ {"FileSystemObjectType": 0,"Id": 1,"ContentTypeId": "0x0100BC97B2F575CB0C42B79549F3BABD32A8","Title": "Nokia...
View ArticleJersey message body reader not found in maven-built JAR
My application uses a REST (JAX-RS Jersey) interface. When I run it in Eclipse, everything's fine. The domain objects are annotated, I'm not using XML files for the REST mapping.Now I created a...
View ArticleHTTP method names: upper or lower case?
This may be a self-answering question, but I'm hoping one of you could point me to any resource where it is declared, or can be inferred, whether to use upper or lower case letters when declaring an...
View Articlecxf rest spring service giving error
I am trying to expose rest service using cxf rest. i have cxf 2.7.5 and spring 3.1.3.RELEASE when trying to use the url http://localhost:8080/web/services/rest/getreq its giving error.Status Code: 500...
View ArticleERROR: insert or update on table "promos" violates foreign key constraint...
I'm trying to bulid a REST API using go and specifically GORM.My entities look like this:type Business struct { ID string `json:"id" gorm:"primaryKey;not null;type:uuid;default:gen_random_uuid()"`...
View ArticleWhat are the best practices to add metadata to a RESTful JSON response?
BackgroundWe are building a Restful API that should return data objects as JSON. In most of the cases it fine just to return the data object, but in some cases, f.ex. pagination or validation, we need...
View ArticleOData queries and types other than IQueryable in ASP.NET Web API
I am building an ASP.NET Web API application that returns an Atom or an RSS feed. To do this, it builds a System.ServiceModel.Syndication.SyndicationFeed and a custom MediaTypeFormatter is responsible...
View ArticleHow to get lastSignInDateTime from Azure AD through Postman
I need to fetch lastSignInDateTime from Azure AD through Postman.May I know how I can the fetch the details of the usersI tried with below URL but it's not working for...
View ArticleHow can I update keycloak's user details programmatically (java), without...
I want to update the user detail. e.g. I created user(k1) in "demo" realm from keycloak admin console. I have one java client and I want to update the user(k1) details like. Change Email address of...
View ArticleRunning independent endpoint requests on parallel in Python [duplicate]
I have a functions which is being accessed using REST API methodology by Fast API. Right now, when user request my endpoints, each method is processed synchronously.async def endpoint1(param1, param2):...
View Articlewhat status code to throw when there is a concurrency error?
I have a REST API that receives among other things, a date and with it, makes a reservation. The problem occurs when 2 people "at the same time" try to book on the same day, at the same time.Obviously,...
View ArticleSpring RestTemplate gives 401 Unauthorized error when sending with...
I am trying to hit one Microsoft Flow POST URL in my Spring Rest application using following code but it is giving me 401 error.My Code: @RequestMapping(value = "/hookslistner", method =...
View ArticleHow to get code coverage using postman test
We have REST services created in RestEasy and running in wildfly server. We are running Postman test cases to test the Rest URLs. Is there a way to get a code coverage of the services when we execute...
View ArticleREST collections, good practice to do: GET api/CollectionA//CollectionB?
I need to be able to grab a collection based on a collection of objects. For this, I'm considering a couple of approaches, but am not sure which one makes the most sense, so I'll post them both. If...
View ArticleOn a thread without an initialized context nor a classlo
I want to create my First REST Api with Jakarta and TomEE plume Server.The Deployment and api call over HTTP works, but I need still to Fix the Exception because learning how to Programm right.At...
View ArticleError fetching repositories: HTTP error! status: 401
So, I developed a portfolio website that fetches repositories and details from GitHub and send it to my website. While using localhost everything was working fine but as i deployed the code in Vercel...
View ArticleHow to get a specific row after every 15 rows in laravel?
DB Schema :id | video id | sponsored1 | 1 | 02 | 2 | 03 | 3 | 04 | 4 | 05 | 5 | 06 | 6 | 07 | 7 | 08 | 8 | 09 | 9 | 010 | 10 | 1I need to get Sponsored = 1 every 10 rows from a list of video . I worked...
View Articlehow to connect to REST web service from Java application
I have to test the EPA's Data Exchange Web Services. Since it is difficult to create 100 accounts, buildings, energy usage distributions, etc. I want to automate the process. I searched for code...
View Article