Category : httprequest

HTML PATCHING FORM {{ Form::model($model , [ ‘route’ => [‘admin.friendship.update’, $model->id] , ‘class’=>’needs-validation ajax-form’, ‘method’ => ‘post’ ]) }} @method(‘PATCH’) {{ Form::select(‘user_id’ , $users , null , [‘id’ => ‘sender’, ‘class’ => ‘form-control’]) }} {{ Form::select(‘friend_id’ , $users , null , [‘id’ => ‘reciever’, ‘class’ => ‘form-control’]) }} {{ Form::select(‘status’ , [‘-2’ => -2 , ..

Read more

I’m trying to find the source of some 404 errors in my Laravel 8 app. For example, I’m getting several 404 requests for: https://www.example.com/apple-touch-icon.png In my controller where I’m logging 404 requests, I have: $str = Storage::disk( ‘local’ )->get( ‘404.log’ ); $str = ‘URL: ‘ . request()->fullUrl() . ‘ Referer: ‘ . request()->headers->get( ‘referer’ ) ..

Read more

This is my http request, which works very well: $result = $client->request(‘PROPFIND’, $filePath, [ ‘auth_basic’ => [$user, $authKey], ‘headers’ => [‘depth’ => ‘4’,], ]); I try now to get these properties here… <?xml version="1.0"?> <d:propfind xmlns:d="DAV:" xmlns:oc="http://mypage.org" xmlns:nc="http://mypage.org"> <d:prop> <d:getlastmodified /> <d:getetag /> <d:getcontenttype /> <d:resourcetype /> <oc:fileid /> <oc:permissions /> <oc:size /> <d:getcontentlength /> ..

Read more

In my Symfony function I am creating a folder, and inside this folder another folder: $client = HttpClient::create(); $createFolder = $client->request(‘MKCOL’, $path.$foldername, [ ‘auth_basic’ => [$user, $authKey], ]); $createImageFolder = $client->request(‘MKCOL’, $path.$foldername/images’, [ ‘auth_basic’ => [$user, $authKey], ]); It works well, but somtimes the first folder is not created fast enough, and the image folder ..

Read more

I’m making a coding challange website, where user can send in his code, then it is compiled and tested with given test cases. For code compiling i’m using Judge0 API (https://ce.judge0.com/) This is how I get/post to the API: public function testCode($languageId, $code, $stdin = null) { $response = Http::withHeaders([ ‘x-rapidapi-key’ => $this->token, ‘x-rapidapi-host’ => ..

Read more