Category : http

Buenos dias Developers hoy me encuentro en una situaciĆ³n anteriormente ya habia usado livewire de laravel para mis proyectos pero no me habia enfrentado a esto tengo un dominio de un sistema en operacion me solicitaron mejoras e implemente livewire sabemos que para publicar los assets de livewire se debe publicar los archivos con php ..

Read more

I am creating a user with the api provided. I am using Laravel and trying to store data to smartrmail and docs to create new subscriber is here https://docs.smartrmail.com/en/articles/636615-list-subscribers Each time i send request i get following error: Server error: `POST https://go.smartrmail.com/api/v1/lists/1sptso/list_subscribers` resulted in a `500 Internal Server Error` response: {"error":"param is missing or the ..

Read more

Update: Am I reading the MDN docs right? The Set-Cookie is forbbiden as response header? Then how am I supposed to make Laravel Sanctum set the XSRF token cookie? https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie : Warning: Browsers block frontend JavaScript code from accessing the Set Cookie header, as required by the Fetch spec, which defines Set-Cookie as a forbidden ..

Read more

This is the our list service api. POST /createList /start process to create list. Return listId/ GET /checkList/listId /returns status of the list. Processing, completed etc/ GET /getList/idlistId /if status completed return payload/ Do while or cron job can be used as a solution. But I am looking for the most optimal solution that can ..

Read more

I’m currently working on a project where i got stuck on connecting Laravel 8 with Flutter. When I run the API normal inside Postman, everything works perfectly once I try it inside Flutter i got the follow error. Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = [IP Address Server], port = ..

Read more

I’m trying to make a post http request using IlluminateSupportFacadesHttp. My request : $response = Http::post( $this->api.’/auth’, [ ‘auth’ => [ ‘username’ => $this->username, ‘password’ => $this->password ] ] )->json(‘response’); While api,username and password are set in a __construct method. This request is working well in postman. But when I run it on php server ..

Read more

I am trying to replicate tinyurl functionality. Here is the flow of the application: URL Route: abc.com/{id} – there is a URL in the database against the ID. Route::get(‘/{id}’, [AppHttpControllersController::class, ‘direct’]); Controller: Receiving the route request, following actions are being performed in the controller: public function direct($id) { $link = Link::where(DB::raw(‘BINARY `slug`’),’=’,$id)->where(‘status’,’=’,1)->firstOrFail(); $url = $link->url; ..

Read more

I am working in a Vue app with a Laravel api and I am getting exactly what it says in the title. My Axios call: return await axios.post("/customers/load-cart-data", payload); Inside the general section of my network tab: Request Method: POST What I get back from our api: "message": "The GET method is not supported for ..

Read more

Sends post request to another api inside Laravel controller. It returns .pdf file as a response. I wanna save this file to storage. I get FileNotFound exception. Here is the code public function cvToPDF(Request $request) { $response = Http::withHeaders([‘Content-Type’ => ‘application/pdf’]) ->withToken(Request()->bearerToken()) ->post(‘http://some-endpoint’, $request->all()); Storage::disk(‘s3’)->putFile(‘drive/files’, $response); return $response; } return $response works in client side. ..

Read more

SCENARIO: When I tried to search (POST route) a keyword, results of item will be display as lists. These items has a button (Save or UnSave) on each list. The save button, is either form POST or DELETE method and what happens is when this button clicked, either the item will SAVE or UNSAVE from ..

Read more

I am currently trying to upload multiple files through an API endpoint. It’s a POST request, its body contains form-data. I am unable to get it through for each loop, though it works just fine if there’s no foreach and there’s only one file. Code that doesn’t work: $path = config(‘app.photos_dir’); if($request->hasFile(‘photos’)) { if (!file_exists($path)) ..

Read more

i want to store response data like private property to variable when called method use IlluminateSupportFacadesHttp; public function myMethod(){ $result = []; $response = Http::asForm()->withHeaders([ ‘origin’ => ‘https://example.com’, ‘content-type’ => ‘application/x-www-form-urlencoded’, ‘referer’ => ‘https://example.com’, ])->post(‘https://example.com’, [ ’email’ => ‘[email protected]’, ‘pass’ => ‘mypassword’, ‘login’ => ‘Log+In’, ‘withCredentials’ => true, ]); $result = $response; } Result : ..

Read more

I have application in Angular 11 and Laravel. I need display time status every second in html in Angular. Now I have method: this.uptimeService.getUptimeByUserForToday(userid, newDateNow).subscribe(res => { if (res.status === ‘Ok’) { if (res.item != null) { this.currentUptimeDTO = res.item; } The request is send over Http every second. I get error 429, too many ..

Read more