• Skip to main content
  • Skip to navigation

Cookies on Legislation.gov.uk

The cookies on legislation.gov.uk do two things: they remember any settings you've chosen so you don't have to choose them on every page, and they help us understand how people browse our website, so we can make improvements and fix problems. We need your consent to use some of these cookies.

  • Find out more or set individual cookie preferences
Join the team
Would you like to join the legislation.gov.uk team? We’re currently recruiting for a Data Analyst (Developer).
  • Click here to apply
  • Close

legislation.gov.uk

http://www.nationalarchives.gov.uk
  • Cymraeg
  • Home
  • Explore our collections
  • Research tools
  • Help and guidance
  • What's new
  • About us
  • Search LegislationHide

Search Legislation

Advanced Search

Section Navigation

  • Requests
  • Response Codes
  • Compression

Back to top

HTTP Responses

This page describes the use of HTTP responses within Legislation API.

Requests

It should be noted that the Legislation API is currently 'read-only' and that the only HTTP methods supported are GET and HEAD.

Response Codes

One of the objectives of the API is to correctly implement the use of HTTP response codes for all requests. By doing this a user agent can correctly process the response sent to it safe if the knowledge that the status code being sent correctly reflects the server's intention.

Response codes have been implemented as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Individual pages within Help will give more detail on the expected response codes that will occur given the possible scenarios.

Compression

Pages are set to compress the content being served if the response is larger than 512KB.

  • New site design
  • Help
  • About us
  • Site map
  • Accessibility
  • Contact us
  • Privacy notice
  • Cookies

OGL logoAll content is available under the Open Government Licence v3.0 except where otherwise stated. This site additionally contains content derived from EUR-Lex, reused under the terms of the Commission Decision 2011/833/EU on the reuse of documents from the EU institutions. For more information see the EUR-Lex public statement on re-use.

© Crown and database right