-2

I am debugging a problem right now at work, and wondering if rest api can be ip address or must it be a url (ie. www.google.com/countries)

user2763557
  • 449
  • 5
  • 18

1 Answers1

1

I am debugging a problem right now at work, and wondering if rest api can be ip address or must it be a url (ie. www.google.com/countries)

TL;DR: yes, it can be an IP address.

Typically, REST uses uniform resource identifiers, which are described by RFC 3986. You seem to be asking specifically about the host portion, described in section 3.2.2.

The host subcomponent of authority is identified by an IP literal encapsulated within square brackets, an IPv4 address in dotted-decimal form, or a registered name.

The standards for dealing with IPv6 zone identifiers is described by RFC 6874.

Community
  • 1
  • 1
VoiceOfUnreason
  • 52,766
  • 5
  • 49
  • 91