Skip to content

Instantly share code, notes, and snippets.

View JacopoMangiavacchi's full-sized avatar

Jacopo Mangiavacchi JacopoMangiavacchi

View GitHub Profile
@JacopoMangiavacchi
JacopoMangiavacchi / Application.kt
Created October 23, 2017 17:21
Kotlin - Spring Rest Test : <- Post <- Request <- Get
package kotlindemo
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
import org.springframework.web.client.RestTemplate
@JacopoMangiavacchi
JacopoMangiavacchi / Application.java
Created October 23, 2017 17:20
Java - Spring Rest Test : <- Post <- Request <- Get
package javatest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.client.RestTemplate;
@JacopoMangiavacchi
JacopoMangiavacchi / Program.cs
Created October 23, 2017 17:19
C# - .Net Core Rest Test : <- Post <- Request <- Get
using System;
using System.IO;
using System.Text;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Routing;
using Newtonsoft.Json;
using System.Net.Http;
@JacopoMangiavacchi
JacopoMangiavacchi / main.go
Created October 23, 2017 17:18
Go - Gorilla Mux Rest Test : <- Post <- Request <- Get
package main
import (
"encoding/json"
"log"
"net/http"
"io"
"io/ioutil"
"github.com/gorilla/mux"
@JacopoMangiavacchi
JacopoMangiavacchi / main.swift
Last active October 31, 2017 00:20
Swift - Kitura Rest Test : <- Post <- Request <- Get
import Foundation
import Kitura
import KituraContracts
import KituraKit
struct Language : Codable {
var language: String
}
struct Request : Codable {