This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sending query: | |
| GET /post/api HTTP/1.0 | |
| debug: >> Handshake [ClientHello TLS12 (ClientRandom "\ETBT\140^\184\190#\221B\212M(\131v\142\162\189>\217\247\172du\225\255\214\ETBs4\178'\SOH") (Session Nothing) [107,103,57,51,56,50,47,53,4,5] [0] [(0,"\NUL\DC2\NUL\NUL\SIwww.digipost.no"),(65281,"\NUL")] Nothing] | |
| debug: << Handshake [ServerHello TLS12 (ServerRandom "\197\130\209\SI\FS\ENQ4\144\253\137\173@\231|'\183\227\172?L\DC1\233U\ENQ\DEL\190\&6\227(\189\ETX8") (Session (Just "\193\174\218\248\132\140!t,\251\ETX\149~\210\ACK\168\203\221f\135=\238\179A\207^\137\236};;\170")) 5 0 [(65281,"\NUL")]] | |
| debug: << Handshake [Certificates (CertificateChain [SignedExact {getSigned = Signed {signedObject = Certificate {certVersion = 2, certSerial = 63137424126100586097831251537720349550, certSignatureAlg = SignatureALG HashSHA1 PubKeyALG_RSA, certIssuerDN = DistinguishedName {getDistinguishedElements = [([2,5,4,6],ASN1CharacterString {characterEncoding = Printable, getCharacterStringRawData = "US"}),([2,5,4,10],ASN1Characte |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sending query: | |
| GET / HTTP/1.0 | |
| debug: >> Handshake [ClientHello TLS12 (ClientRandom "\177\182(\192N\248\170\ETX\ETBr5\232\236\171o\190M(\229\235\224\135\DC1\173\&7\bwI\137\134\201^") (Session Nothing) [107,103,57,51,56,50,47,53,4,5] [0] [(0,"\NUL\DC2\NUL\NUL\SIwww.digipost.no"),(65281,"\NUL")] Nothing] | |
| debug: << Handshake [ServerHello TLS12 (ServerRandom "\152;xVN\184\205t\134\170\187\155`\182\208;n\136\t\ESC\196x\129\178\166AH]\DC3n\139P") (Session (Just "\193\174\218\248\132\140?~,\251\ETX\149~\210\NUL\168\251Pkp\rs\237u\207^\137\236};6X")) 5 0 [(65281,"\NUL")]] | |
| debug: << Handshake [Certificates (CertificateChain [SignedExact {getSigned = Signed {signedObject = Certificate {certVersion = 2, certSerial = 63137424126100586097831251537720349550, certSignatureAlg = SignatureALG HashSHA1 PubKeyALG_RSA, certIssuerDN = DistinguishedName {getDistinguishedElements = [([2,5,4,6],ASN1CharacterString {characterEncoding = Printable, getCharacterStringRawData = "US"}),([2,5,4,10],ASN1CharacterString {characterEncoding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HelloWorldGrinder extends GrinderTest { | |
| val test = Test(1, "Hente VG") | |
| val request = test.wrap(new HTTPRequest()) | |
| override def runTest() { | |
| request.GET("http://www.vg.no") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| case class Tester { | |
| def test = "Hei" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Domain object | |
| case class Person(private val name: String) | |
| //Pimp-my-library style operations for Person | |
| class PersonOps(val person: Person, val service: PersonService) { | |
| def save() = service.save(person) | |
| } | |
| class PersonService { | |
| def save(person: Person) = person match { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def printMessageFromDB() { | |
| doSomethingBefore() | |
| var message = doInTransaction { _ => DB.getMessage } | |
| println(message) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def doInTransaction[T](action: (TransactionStatus) => T): T = { | |
| template.execute(new TransactionCallback[T] { | |
| override def doInTransaction(transactionStatus: TransactionStatus): T = { | |
| action(transactionStatus) | |
| } | |
| }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void printMessageFromDB() { | |
| doSomethingBefore(); | |
| String message = template.execute(new TransactionCallback<String>() { | |
| @Override | |
| public String doInTransaction(final TransactionStatus transactionStatus) { | |
| return DB.getMessage(); | |
| } | |
| }); | |
| System.out.println(message); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def addTimestamp(text: String) = "%s - %s".format(new Date(), text) | |
| print("Hello World!", addTimestamp) | |
| >> Tue Oct 25 22:01:04 CEST 2011 - Hello World! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def print(text: String, decorate: (String) => String) { | |
| println(decorate(text)) | |
| } | |
| print("Hello World!", "<html>" + _ + "</html>") | |
| >> <html>Hello World!</html> |
NewerOlder