Angular 17 Http client injection
I am building a new app for testing with angular 17 trying to connect to a simple API rest. I am desperate to get this to work. I have asked chat GPT, reviewed stack's older posts and even download an...
View ArticleHow to fix Form Data via XHR returns 400 Bad Request
This is my code, quite simple. just a POST request to my api endpoint with FormData.but for some unknown reason the api says the data is a bad request. i tested my api via curl and it works fine.const...
View ArticlePrevent SQL injection when SQL is supplied from the request
The company I am working at uses a REST API for database accesses. So basically, you just provide a SQL statement string and the REST API returns a Datatable. Now I am unsure as to how to prevent an...
View ArticleDe-serialize array from RestClient response
I'm able to de-serialize response for "get one" endpoint to desired object type: import org.springframework.web.client.RestClient; ... RestClient restClient = RestClient.create(); return...
View ArticleHow do I react to errors thrown in the backend in the frontend in nuxt?
I wrote a server REST-endpoint in Nuxt3. Now I want to show a toast message in the frontend, depending on the response I get from it. I want to be able to catch errors thrown in it in the vuejs page I...
View ArticleHow to test the JWT validation in spring security
Hello I wanted to create a sample spring boot service with spring security and test it where a JWT Token is passed to a rest api and I need to validate it using filter chain but seems I am missing...
View ArticleNextJs router to match Forms
I have a basic app that posts an object to the back end.Frontend is nextjs and backend is django, thus backend does not matter for this questionI am sticking to crud/rest as much as I can.My question...
View ArticleHow to insert a DEFAULT custom header value to all Mock SoapUI REST projects?
I have SoapUI (Open Source Edition) installed on a windows. To teste my REST project my frontend send the data to Mock SoapUI and to avoid the CORS issue I need put in the actions 3 headers manualy to...
View ArticleSend IformData as a field within Postman
This is my postman setup;for the request object;public class UploadRequest { public List<IFormFile> File { get; set; } public int EntityType { get; set; } public int ReferenceId { get; set; }...
View ArticleReturn entity in a case if it already exist - API Platform
I have entity Tag, which have unique property tagValue. When I make a POST with already exists tagValue I want to get it in response.config/validator/tag.yaml:App\Entity\Tag: constraints: -...
View ArticlePowershell: Out-File - Access to the path is denied
I've got a REST call (POST) for downloading a PDF file. The API call responds in a binary version of the PDF file. I want to save the file on my machine as a .pdf. However, I am getting an...
View ArticleJackson adds backslash in json
I'm building REST service on Jersey and using Jackson to produce JSON from java classes of my model. Model with absolutely simple values, I think this is the most typical case. But I get strange...
View ArticleReduce Flask-API downtime in IIS
I'm using waitress to serve a Flask Python API in IIS 10.0, with the purpose of serving endpoints for reverse image searching.The initial part the script deals with importing a number of large files,...
View ArticleHow to call https.patch in Netsuite to update Salesforce record?
I am trying to update custom 'city' field in salesforce customer record using user event script. Patch is supported in salesforce to update records but does not support in Netsuite.I have created user...
View ArticleHow do I remove the "d" node from the GET Response
My team provided me a GET called. However, the response contains a "strange" d node. I tried to ask them for help and they asked me to use XML instead (I know). I am here to see if someone can tell why...
View ArticleKeycloak returns Unauthorized 401
I'm running bitnami's Keycloak image on my local.what I want to do is; use Keycloak REST APIs.but no matter how hard I try, I'm getting 401.I have done what's written in the doc. so this is a...
View Articlecan't iterate over array created in service - async issue?
I create an array of Items like this in my service:items: IItem[] = [];...LoadItems() { this.GetItems().subscribe((res) => { // console.log(res); if (res.status == 200 && res.body.data !=...
View ArticleHow to make .NET framework 4.8 versioning work with Web API
I am working on a .NET framework 4.8 Web API project and I'm trying to enable versioning on the REST API endpoints. All the endpoints are broken and I am unable to figure out what is wrong. Can anyone...
View Articlecan not access rest API running in docker container
I have a REST API built in .net 8. When it runs on my machine, I can test it using Postman (http://localhost:8009/api/...) without issue. But when I running it from inside a docker container, the...
View ArticleWhat is the difference between POST and PUT in HTTP?
Background Information Analysis:According to RFC 2616, ยง 9.5, POST is used to create a resource:The POST method is used to request that the origin server accept the entity enclosed in the request as a...
View Article