Skip to content

hmrc/api-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Simulator

Example of non-trivial API.

Unit tests

sbt test

Integration tests

sbt it:test

Examples of how to test the HTTP requests available using curl:

POST /user/processBytes

testing the local environment
curl -v -X POST -H "Accept: application/vnd.hmrc.1.0+json" --data-binary @"<FILE_PATH>" http://localhost:8103/user/processBytes
curl -v -X POST -H "Accept: application/vnd.hmrc.1.0+json" --data "Hello mate"          http://localhost:8103/user/processBytes
testing the staging environment, through the curl-microservice Jenkins job
curl -X POST  \
       -H "Cache-Control: no-cache"  \
       -H "Content-Type: application/x-www-form-urlencoded"  \
       -d 'ARGS= -v -X POST -H "Accept: application/vnd.hmrc.1.0+json" -H "Content-Type: application/json" --data "Hello mate" http://<API_SIMULATOR_HOST>/user/processBytes'  \
       "https://<JENKINS_USR>:<JENKINS_API_TOKEN | JENKINS_PWD>@<JENKINS_HOSTNAME>/job/curl-microservice/buildWithParameters"

License

This code is open source software licensed under the Apache 2.0 License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 14