func (r *RenderRawResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200, 304})
	if err != nil {
		return err
	}
	return nil
}
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
package markdown
import (
	"context"
	"fmt"
	requests "github.com/willabides/octo-go/requests"
	"io"
	"net/http"
)
func Render(ctx context.Context, req *RenderReq, opt ...requests.Option) (*RenderResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(RenderReq)
	}
	resp := &RenderResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) Render(ctx context.Context, req *RenderReq, opt ...requests.Option) (*RenderResponse, error) {
	return Render(ctx, req, append(c, opt...)...)
}
type RenderReq struct {
	_url        string
	RequestBody RenderReqBody
}
func (r *RenderReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals:  map[string]*string{"content-type": strPtr("application/json")},
		Method:      "POST",
		Options:     opt,
		URLPath:     fmt.Sprintf("/markdown"),
	})
}
func (r *RenderReq) Rel(link string, resp *RenderResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type RenderReqBody struct {
	Context *string `json:"context,omitempty"`
	Mode *string `json:"mode,omitempty"`
	Text *string `json:"text"`
}
type RenderResponse struct {
	httpResponse *http.Response
}
func (r *RenderResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *RenderResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200, 304})
	if err != nil {
		return err
	}
	return nil
}
func RenderRaw(ctx context.Context, req *RenderRawReq, opt ...requests.Option) (*RenderRawResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(RenderRawReq)
	}
	resp := &RenderRawResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) RenderRaw(ctx context.Context, req *RenderRawReq, opt ...requests.Option) (*RenderRawResponse, error) {
	return RenderRaw(ctx, req, append(c, opt...)...)
}
type RenderRawReq struct {
	_url string
	RequestBody io.Reader
}
func (r *RenderRawReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals:  map[string]*string{"content-type": strPtr("text/x-markdown")},
		Method:      "POST",
		Options:     opt,
		URLPath:     fmt.Sprintf("/markdown/raw"),
	})
}
func (r *RenderRawReq) Rel(link string, resp *RenderRawResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type RenderRawResponse struct {
	httpResponse *http.Response
}
func (r *RenderRawResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}