---
title: NewRequest
summary: NewRequest constructs an outgoing request with the given HTTP method, URI, and body. The URI is parsed via url.Parse.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/fn.NewRequest/
---

**Kind:** Function  
**Module:** [fsthttp](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/request.go#L136

```go
func NewRequest(method string, uri string, body io.Reader) (*Request, error)
```

NewRequest constructs an outgoing request with the given HTTP method, URI,
and body. The URI is parsed via url.Parse.

**Parameters**

- `method`: `string`
- `uri`: `string`
- `body`: `io.Reader`

**Returns**

`(*Request, error)`
