Mongodb – Id getting changed in spring boot request
I have created a project with spring boot and MongoDB as database. I am trying to hit a get request to fetch the data that I have saved in the database. For fetching that I am passing an id from…
I have created a project with spring boot and MongoDB as database. I am trying to hit a get request to fetch the data that I have saved in the database. For fetching that I am passing an id from…
I am testing a NestJS application using Postman. In NestJS we have @Request() decorator(part of @nestjs/common), in which I have the context of the currently logged-in user of my application, which I can access using req.userId or req['userId'] It works…
The Postman forums have quite a few topics dedicated to the async nature of sendRequest(). I'm trying to produce a clean example on how this works with reusable code. I've run into some queries around calling the async function within…
If got a controller endpoint expecting a DTO with just a list of Ids to fetch this specific list of IDs. When sending the following request to the endpoint, it returns an error the idList field is required I tried…
I am using Postman and trying to get a response from Gemini API when trying to make a prompt including an image. I am sending the requesto to: https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent { "contents":[ { "parts":[ {"text": "What is this picture?"}, { "inline_data":…
So i am building backend of a blog application and almost every other route is working just fine but for some reason route blogRouter.get('/:id') is not (This route is suppose to return blog whose id is being send in the…
I am trying to set up and test push notifications using Firebase Cloud Messaging (FCM) with the new HTTP v1 API via Postman. I need to generate an OAuth 2.0 token to authenticate my requests and send a push notification…
I am creating an API Laravel project and it seems that there an error I can't find. I want to get data from the table 'units'. These are the codes: bootstrap/app.php <?php use IlluminateFoundationApplication; use IlluminateFoundationConfigurationExceptions; use IlluminateFoundationConfigurationMiddleware; return Application::configure(basePath:…
I used post method in laravel still getting error 404. Here is my code: TaskController.php public function changeStatus(Request $request, $id) { try { DB::beginTransaction(); $task = Task::find($id); if (!$task) { return Helper::error(__('messages.task_not_found'), 404); } $input = $request->all(); $validator = Validator::make($input,…
Having JSON response with nested elements. I would like to validate it against JSON test data using Postman and test functions. For the moment I can easily reach it by hardcoding: const jsonData = pm.response.json(); pm.expect(jsonData.items[0].title).to.eql(pm.iterationData.get("title")); pm.expect(jsonData.items[1].title).to.eql(pm.iterationData.get("title")); here is my…