(options *requestOptions)
| 112 | } |
| 113 | |
| 114 | func getExpectedContentType(options *requestOptions) string { |
| 115 | if options != nil && options.ExpectedContentType != nil { |
| 116 | return *options.ExpectedContentType |
| 117 | } |
| 118 | |
| 119 | return contentTypeApplicationJSON |
| 120 | } |
| 121 | |
| 122 | func getReq(ctx context.DnoteCtx, path, method, body string) (*http.Request, error) { |
| 123 | endpoint := fmt.Sprintf("%s%s", ctx.APIEndpoint, path) |