<commit_before># iREST

[ ![Codeship Status for bsedg/irest](https://codeship.com/projects/2d4b3280-3e78-0134-9c3a-5218b375052b/status?branch=master)](https://codeship.com/projects/167341)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Go Report Card](https://goreportcard.com/badge/github.com/bsedg/irest)](https://goreportcard.com/report/github.com/bsedg/irest)

Integration testing framework for creating for RESTful APIs with golang.


```
// Example using iREST to test an API.

import (
    "net/http"

    "github.com/bsedg/irest"
)

func main() {
    t := irest.NewTest("Sample Test")

    s := &Something{}
    t.NewTest("Create something").
        AddHeader("Content-Type", "application/json").
        Post("localhost/somethings").
        MustStatus(http.StatusCreated).
        ParseResponseBody(s)

    t.NewTest("Get something").
        Get("localhost/somethings/" + s.ID).
        MustStatus(http.StatusOK)
}

```
<commit_msg>Add godoc link in readme.<commit_after># iREST

[ ![Codeship Status for bsedg/irest](https://codeship.com/projects/2d4b3280-3e78-0134-9c3a-5218b375052b/status?branch=master)](https://codeship.com/projects/167341)
[![GoDoc](https://godoc.org/github.com/bsedg/irest?status.svg)](http://godoc.org/github.com/bsedg/irest)
[![Go Report Card](https://goreportcard.com/badge/github.com/bsedg/irest)](https://goreportcard.com/report/github.com/bsedg/irest)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Integration testing framework for creating for RESTful APIs with golang.


```
// Example using iREST to test an API.

import (
    "net/http"

    "github.com/bsedg/irest"
)

func main() {
    t := irest.NewTest("Sample Test")

    s := &Something{}
    t.NewTest("Create something").
        AddHeader("Content-Type", "application/json").
        Post("localhost/somethings").
        MustStatus(http.StatusCreated).
        ParseResponseBody(s)

    t.NewTest("Get something").
        Get("localhost/somethings/" + s.ID).
        MustStatus(http.StatusOK)
}

```

{'fraction_non_alphanumeric': 0.1706516643225504, 'fraction_numerical': 0.029067041725269572, 'mean_word_length': 3.7422222222222223, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 13, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '999685', 'n_tokens_mistral': 808, 'n_tokens_neox': 748, 'n_words': 105}