<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/hal+json",
    "x-api-key: a0B1c2D34D5c6b7a8"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.postcodeapi.nu/v2/addresses/');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'postcode' => '5038EA',
  'number' => '19'
));

$request->setHeaders(array(
  'accept' => 'application/hal+json',
  'x-api-key' => 'a0B1c2D34D5c6b7a8'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.postcodeapi.nu/v2/addresses/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'postcode' => '5038EA',
  'number' => '19'
)));

$request->setHeaders(array(
  'accept' => 'application/hal+json',
  'x-api-key' => 'a0B1c2D34D5c6b7a8'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
curl --request GET \
  --url 'https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19' \
  --header 'accept: application/hal+json' \
  --header 'x-api-key: a0B1c2D34D5c6b7a8'
http GET 'https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19' \
  accept:'application/hal+json' \
  x-api-key:a0B1c2D34D5c6b7a8
wget --quiet \
  --method GET \
  --header 'x-api-key: a0B1c2D34D5c6b7a8' \
  --header 'accept: application/hal+json' \
  --output-document \
  - 'https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19")
  .get()
  .addHeader("x-api-key", "a0B1c2D34D5c6b7a8")
  .addHeader("accept", "application/hal+json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.get("https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19")
  .header("x-api-key", "a0B1c2D34D5c6b7a8")
  .header("accept", "application/hal+json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19",
  "method": "GET",
  "headers": {
    "x-api-key": "a0B1c2D34D5c6b7a8",
    "accept": "application/hal+json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19");
xhr.setRequestHeader("x-api-key", "a0B1c2D34D5c6b7a8");
xhr.setRequestHeader("accept", "application/hal+json");

xhr.send(data);
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.postcodeapi.nu",
  "port": null,
  "path": "/v2/addresses/?postcode=5038EA&number=19",
  "headers": {
    "x-api-key": "a0B1c2D34D5c6b7a8",
    "accept": "application/hal+json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.postcodeapi.nu/v2/addresses/',
  qs: { postcode: '5038EA', number: '19' },
  headers: 
   { accept: 'application/hal+json',
     'x-api-key': 'a0B1c2D34D5c6b7a8' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
var unirest = require("unirest");

var req = unirest("GET", "https://api.postcodeapi.nu/v2/addresses/");

req.query({
  "postcode": "5038EA",
  "number": "19"
});

req.headers({
  "accept": "application/hal+json",
  "x-api-key": "a0B1c2D34D5c6b7a8"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
import http.client

conn = http.client.HTTPSConnection("api.postcodeapi.nu")

headers = {
    'x-api-key': "a0B1c2D34D5c6b7a8",
    'accept': "application/hal+json"
    }

conn.request("GET", "/v2/addresses/?postcode=5038EA&number=19", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "https://api.postcodeapi.nu/v2/addresses/"

querystring = {"postcode":"5038EA","number":"19"}

headers = {
    'x-api-key': "a0B1c2D34D5c6b7a8",
    'accept': "application/hal+json"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: application/hal+json");
headers = curl_slist_append(headers, "x-api-key: a0B1c2D34D5c6b7a8");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19");
var request = new RestRequest(Method.GET);
request.AddHeader("accept", "application/hal+json");
request.AddHeader("x-api-key", "a0B1c2D34D5c6b7a8");
IRestResponse response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "a0B1c2D34D5c6b7a8")
	req.Header.Add("accept", "application/hal+json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"x-api-key": @"a0B1c2D34D5c6b7a8",
                           @"accept": @"application/hal+json" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19" in
let headers = Header.add_list (Header.init ()) [
  ("x-api-key", "a0B1c2D34D5c6b7a8");
  ("accept", "application/hal+json");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
require 'uri'
require 'net/http'

url = URI("https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["x-api-key"] = 'a0B1c2D34D5c6b7a8'
request["accept"] = 'application/hal+json'

response = http.request(request)
puts response.read_body
import Foundation

let headers = [
  "x-api-key": "a0B1c2D34D5c6b7a8",
  "accept": "application/hal+json"
]

var request = NSMutableURLRequest(URL: NSURL(string: "https://api.postcodeapi.nu/v2/addresses/?postcode=5038EA&number=19")!,
                                        cachePolicy: .UseProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.HTTPMethod = "GET"
request.allHTTPHeaderFields = headers

let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    println(error)
  } else {
    let httpResponse = response as? NSHTTPURLResponse
    println(httpResponse)
  }
})

dataTask.resume()