---
title: httpMethod
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsurlrequest/httpmethod
---

# httpMethod

The HTTP request method.

## Declaration

```swift
var httpMethod: String? { get }
```

## Discussion

Discussion The default HTTP method is “GET”.

## See Also

### Related Documentation

- [httpMethod](foundation/nsmutableurlrequest/httpmethod.md)

### Accessing request components

- [url](foundation/nsurlrequest/url.md)
- [httpBody](foundation/nsurlrequest/httpbody.md)
- [httpBodyStream](foundation/nsurlrequest/httpbodystream.md)
- [mainDocumentURL](foundation/nsurlrequest/maindocumenturl.md)
