Coder Social home page Coder Social logo

myguzzle's Introduction

myGuzzle

is a php class for post request multipart or form_params from [GuzzleHttp] (https://github.com/guzzle/guzzle) package.

#How To Use for laravel user, just copy this in your class custom library, don't forget to add that directory in app/start/global.php

##Form_params in your controller client

$data = array(
    'id' => $data['id']
);

$routeToController = 'FriendStatus';
$guzzle = new myGuzzle($routeToController);

$return = $guzzle->formParams($data, 'post');
print_r($return);
echo $return;

##Multipart in your controller client

$data = [
  [
      'namesANDcontents' => [
          'id' => Input::get('id');
          'title' => Input::get('title'),
          'title1' => Input::get('title1'),
          'title2' => Input::get('title2'),
          'year_pro' => Input::get('year_pro'),
          'year_pro1' => Input::get('year_pro1'),
          'year_pro2' => Input::get('year_pro2'),
          'genre' => Input::get('genre'),
          'genre1' => Input::get('genre1'),
          'genre2' => Input::get('genre2'),
          'trackType' => Input::get('trackType'),
          'trackType1' => Input::get('trackType1'),
          'trackType2' => Input::get('trackType2'),
      ]
  ],
  [
      'namesANDcontentsFiles' => [
          'fileInput' => Input::file('lagu1'),
          'fileInput1' => Input::file('lagu1'),
          'fileInput2' => Input::file('lagu2'),
      ]
  ]
];

$guzzle = new myGuzzle('testServer');
$return = $guzzle->multiPart($data, 'post');

print_r($return);

#Future Update more handling in request, and some function (i don't know what). jiaahaha.

#contribute and pull request contribute and pull request is needed, please kindly request or contribute in this class (app?).

myguzzle's People

Contributors

fari-99 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.